Skip to content

Using Xaml in the Win32 app model using DesktopWindowXamlSource

Notifications You must be signed in to change notification settings

ChrisGuzak/Win32XamlApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Win32 Xaml App Samples

C++ samples that demonstrate basic Win32 use of Xaml using DesktopWindowXamlSource, also known as Xaml Islands.

  • Minimal - The app client area is all Xaml. The markup is stored as a string and parsed at runtime. Less that 150 lines of code with 50 of it being markup (the NavigationView stolen from Terminals Settings UI)

Win32 Xaml App

  • Multi Window App - A multi-window Win32 app that uses Xaml. This hooks up some handlers to the markups contents to demonstrate responding to Xaml originated events.

Win32 Xaml App Multi Window

Limitations

  • Not using WinUI 2.x, using System Xaml instead.
  • Does not implement accelerator handling or any integration with Win32 UI (who wants to use Win32 UI anyway!).
  • Uses the system provided Xaml Application object, so no way to provide custom metadata.
  • Intellisense in the .xaml files is broken, VS is confused seeing a .xaml file in a Win32 app project type.

Debugging tips

Look in the debugger output window for Xaml parsing errors, it identifies line and offset of the error.

Speical clone instructions

Be sure to clone this repo with --recurse-submodules (docs with details). Alternatively run git submodule update --init to use the Win32AppHelper submodule.

git clone --recurse-submodules https://github.com/ChrisGuzak/Win32XamlApp.git

About

Using Xaml in the Win32 app model using DesktopWindowXamlSource

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published