Monday, July 18, 2011

WPF- XBAP page unload event


Following code explain how to use page unload event in your XBAP pages.

--XAML

<Page x:Class="MyTestPage"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="MyTestPage" Unloaded="Page_Unloaded">



--Code Behind
private void Page_Unloaded(object sender, RoutedEventArgs e)
{

// Your code here


}

No comments:

Post a Comment

Open default email app in .NET MAUI

Sample Code:  if (Email.Default.IsComposeSupported) {     string subject = "Hello!";     string body = "Excellent!";    ...