AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

winui-app

Bootstrap, develop, and design modern WinUI 3 desktop applications with C# and the Windows App SDK using official Microsoft guidance, WinUI Gallery patterns, Windows App SDK samples, and CommunityToolkit components. Use when creating a brand new app, preparing a machine for WinUI, reviewing, refactoring, planning, troubleshooting, environment-checking, or setting up WinUI 3 XAML, controls, navigation, windowing, theming, accessibility, responsiveness, performance, deployment, or related Windows app design and development work.

Original source
openai
License
Apache-2.0
Pinned revision
49f948faa9258a0c61caceaf225e179651397431

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read openai--winui-app at revision 49f948faa9258a0c61caceaf225e179651397431, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 18

references/foundation-winui-app-structure.md


title: WinUI App Structure priority: HIGH tags: app-structure, xaml, resources, pages, bindings, csharp sources:

  • https://github.com/microsoft/WinUI-Gallery
  • https://learn.microsoft.com/windows/apps/winui/

What This Reference Is For

Use this file when structuring a WinUI 3 app, reviewing project layout, or deciding where shell, pages, controls, resources, and view models should live.

Prefer

  • A clear C#-first folder split such as Pages, Controls, ViewModels, Services, Styles, and Assets.
  • App.xaml and shared resource dictionaries for app-wide theme resources and styles.
  • A single main shell window that owns navigation and common chrome.
  • Native command surfaces such as CommandBar for grouped window or page actions before inventing a custom toolbar composition.
  • Strongly typed x:Bind where it improves compile-time safety and performance.

Avoid

  • Putting shell logic, page logic, and resource definitions into one large window file.
  • Scattering theme brushes and styles across many page-local dictionaries.
  • Introducing MVVM ceremony that the project will not actually maintain.

Recommended Shape

  • App.xaml / App.xaml.cs
    • global resources, startup, window creation, app-level exceptions
  • MainWindow.xaml / MainWindow.xaml.cs
    • shell, title bar, top-level navigation host
  • Pages/
    • page views and page-specific logic
  • Controls/
    • reusable WinUI user controls
  • ViewModels/
    • state and commands when the app benefits from separation
  • Styles/
    • resource dictionaries, theme tokens, shared control styles
  • Helpers/ or Services/
    • windowing, navigation, persistence, OS integration helpers

Binding Guidance

  • Prefer x:Bind for page-local properties, event handlers, and strongly typed view model access.
  • Use Binding where the data context is dynamic or a template must stay flexible.
  • Avoid binding patterns that depend on unclear page lifetime or implicit data contexts.

WinUI Gallery Anchors

  • 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.

Review Checklist

  • Are app resources centralized?
  • Is shell logic separated from content pages?
  • Are bindings explicit and maintainable?
  • Is the structure consistent with the scale of the app?