Intersoft.Client.UI.Aqua.UXDesktop Namespace > UXWindow Class : Closing Event |
Public Event Closing As WindowEventHandler
Dim instance As UXWindow Dim handler As WindowEventHandler AddHandler instance.Closing, handler
public event WindowEventHandler Closing
public: event WindowEventHandler^ Closing
The event handler receives an argument of type WindowEventArgs containing data related to this event. The following WindowEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Handled (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. |
HandledBy (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Gets or sets the source object that handles this event. |
IsHandledByPrimitive (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Determines whether this event is handled internally by control infrastructure. |
OriginalSource (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. |
RoutedEvent (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. |
Source (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | Gets or sets a reference to the object that raised the event. |
Window | The window object that relates to the event context. |
public partial class HomeWindow : UXWindow { public HomeWindow() { InitializeComponent(); this.Closing += new Intersoft.Client.Framework.WindowEventHandler(HomeWindow_Closing); } void HomeWindow_Closing(object sender, Intersoft.Client.Framework.WindowEventArgs e) { if (DocumentNotSaved) { MessageBox.Show("Your document has not been saved. Close aborted"); // When the Handled is set to true, the window will cancel the Close command. e.Handled = true; } } }
Target Platforms: Windows 7, 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