Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,077 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Loaded="Window_Loaded"
Unloaded="Window_Unloaded"
Activated="Window_Activated"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Console.WriteLine("create");
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Console.WriteLine("loaded");
}
private void Window_Unloaded(object sender, RoutedEventArgs e)
{
Console.WriteLine("unloaded");
}
private void Window_Activated(object sender, EventArgs e)
{
Console.WriteLine("Activated");
}
}
}