Setting the file. One moment.
Subchapter 38.9
references/foundation-winui-app-structure.mdMarkdown2 KBView on GitHub
Use this file when structuring a WinUI 3 app, reviewing project layout, or deciding where shell, pages, controls, resources, and view models should live.
Pages, Controls, ViewModels, Services, Styles, and Assets.App.xaml and shared resource dictionaries for app-wide theme resources and styles.CommandBar for grouped window or page actions before inventing a custom toolbar composition.x:Bind where it improves compile-time safety and performance.App.xaml / App.xaml.cs
MainWindow.xaml / MainWindow.xaml.cs
Pages/
Controls/
ViewModels/
Styles/
Helpers/ or Services/
x:Bind for page-local properties, event handlers, and strongly typed view model access.Binding where the data context is dynamic or a template must stay flexible.App.xaml.cs shows app-level startup and integration points.MainWindow.xaml shows shell composition, title bar usage, and search integration.Pages/ and Samples/ show how Microsoft organizes pages, helpers, and styles in a real WinUI companion app.