Examples
Example Recipe
- Windows App SDK 1.8+
- Packagedsupported
- Unpackagedsupported
- Verified
This page exists to demonstrate how a recipe is authored. The compatibility line under the title and the Related section at the bottom are generated from frontmatter; nothing in the page body creates them.
- Explain the setup.
- Show the code.
- Explain what to watch out for.
<Window x:Class="App.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextBlock Text="Hello, WinUI" /></Window>public sealed partial class MainWindow : Window{ public MainWindow() { InitializeComponent(); }}Alternative approach
Section titled “Alternative approach”When one section has different requirements from the rest of the page, say so inline:
- Windows App SDK 1.6+
- Packagedsupported
- Unpackagednot supported