0

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:enter image description here

Ghasem
  • 14,455
  • 21
  • 138
  • 171
Felix
  • 571
  • 14
  • 34
  • 1
    You can add a small border with a solid background (not transparent), which has about the same size as the `btnCurDate`, and handle `MouseDown` event on the border. Border does not `intercept` mouse click event so your event handler will work as expected. – kennyzx Jan 16 '16 at 07:33
  • I try this . Thus, i can move the form but now i can not click the button – Felix Jan 16 '16 at 11:21

0 Answers0