Donate

Draggable Window In WPF Using C#

In my WPF application, the opacity of the window has been set to transparent and the ResizeMode has been set to No Resize. This application has a user control as child element.
When the window is renedered on screen, i can't drag the object/window in my screen. So to do this, you have to check the mouse down event in your windows. Then call the DragMove method.
Here is the snippet:
void Window_MouseDown(object sender, MouseButtonEventArgs e)  
{  
   if (e.LeftButton == MouseButtonState.Pressed)  
      this.DragMove();  

Comments

Post a Comment

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.

Invalid nested tag div found, expected closing tag input