Version

Moved Event

Occurs when a XamDialogWindow has moved.
Syntax
'Declaration
 
Public Event Moved As EventHandler(Of MovedEventArgs)
public event EventHandler<MovedEventArgs> Moved
Event Data

The event handler receives an argument of type MovedEventArgs containing data related to this event. The following MovedEventArgs properties provide information specific to this event.

PropertyDescription
Left Gets or sets the Left coordinate property
Top Gets or sets the Top coordinate property
Example
This event fires after the dialog window has moved.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

AddHandler DialogWindow.Moved, AddressOf DialogWindow_Moved
...
Private Sub DialogWindow_Moved(ByVal sender As System.Object, ByVal e As MovedEventArgs)
   System.Diagnostics.Debug.WriteLine("Dialog Window has moved successfully. New left coordinate is " + e.Left.ToString() + ", new top coordinate is " + e.Top.ToString())
End Sub
DialogWindow.Moved += new EventHandler<MovedEventArgs>(DialogWindow_Moved);
...
void DialogWindow_Moved(object sender, MovedEventArgs e)
{
   System.Diagnostics.Debug.WriteLine("Dialog Window has moved successfully. New Left coordinate is "+e.Left+", new top coordinate is "+e.Top);
}
<Grid x:Name="LayoutRoot" Background="White">
   
<ig:XamDialogWindow Content="Dialog Window" 
      
x:Name="DialogWindow" Width="200" Height="200" 
      
Moved="DialogWindow_Moved"/>
</Grid>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also