I am making a window with
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
then I made a button other to move the window, using this.DragMove();
, I put it into some event: MouseDown
(of the button), LeftbutonDown
(of the button) and LeftbutonDown
(of the form), but still can not move the form.
My function:
private void btCurDate_MouseDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}
(the button are defined Click event to do something else). My running form: