Version 24.2 (latest)

Moved Event

Occurs when a XamDialogWindow has moved.
Syntax
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
'Declaration
 
Public Event Moved As EventHandler(Of MovedEventArgs)
 
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);
}
'Declaration
 
Public Event Moved As EventHandler(Of MovedEventArgs)
 
<Grid x:Name="LayoutRoot" Background="White">
   
<ig:XamDialogWindow Content="Dialog Window" 
      
x:Name="DialogWindow" Width="200" Height="200" 
      
Moved="DialogWindow_Moved"/>
</Grid>
'Declaration
 
Public Event Moved As EventHandler(Of MovedEventArgs)
 
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