Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.33 KB

how-to-handle-a-loaded-event.md

File metadata and controls

32 lines (25 loc) · 1.33 KB
title ms.date dev_langs helpviewer_keywords ms.assetid description
How to: Handle a Loaded Event
03/30/2017
csharp
vb
XAML [WPF], Loaded events
events [WPF], Loaded
Loaded events [WPF]
0cf8d003-8441-4df4-807a-6db09347e829
Learn how to handle the FrameworkElement.Loaded event, with an example scenario for handling that event.

How to: Handle a Loaded Event

This example shows how to handle the xref:System.Windows.FrameworkElement.Loaded?displayProperty=nameWithType event, and an appropriate scenario for handling that event. The handler creates a xref:System.Windows.Controls.Button when the page loads.

Example

The following example uses Extensible Application Markup Language (XAML) together with a code-behind file.

[!code-xamlFELoaded#XAML]

[!code-csharpFELoaded#Handler] [!code-vbFELoaded#Handler]

See also