Skip to content

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.

  1. Explain the setup.
  2. Show the code.
  3. Explain what to watch out for.
MainWindow.xaml
<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>
MainWindow.xaml.cs
public sealed partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}

When one section has different requirements from the rest of the page, say so inline:

  • Windows App SDK 1.6+
  • Packagedsupported
  • Unpackagednot supported