Files
docs-desktop/dotnet-desktop-guide/framework/wpf/advanced/how-to-handle-a-loaded-event.md
T
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

1.2 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
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

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