Export (0) Print
Expand All

Window.DragMove Method

In trusted applications, begins a mouse drag operation to move the window.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

<SecuritySafeCriticalAttribute> _
Public Sub DragMove


The current thread is not the user interface (UI) thread.


Application.HasElevatedPermissions is false.

You typically use this method to implement a way for users to drag the window when you hide the window title bar. For information about hiding the title bar and border, see How to: Configure an Application for Out-of-Browser Support.

The following code example demonstrates the use of this method.

' Handle dragging the main window.
Private Sub UserControl_MouseLeftButtonDown(ByVal sender As System.Object, ByVal e As System.Windows.Input.MouseButtonEventArgs)
    If Application.Current.IsRunningOutOfBrowser Then
    End If
End Sub


Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2014 Microsoft