Forum Discussion

tommerfrancis's avatar
tommerfrancis
Tin Contributor
Jan 15, 2026

Using WinUI 3 without XAML

Hello everyone, I would like to know that how to use WinUI 3 without XAML. Thank you very much.

1 Reply

  • Harold-Picado's avatar
    Harold-Picado
    Brass Contributor

    Hi, As far as I know, WinUI 3 is designed around XAML, so there isn't really a supported way to build a WinUI 3 application completely without it.

    You can create and manipulate UI elements from C# code instead of defining them in XAML, but the framework itself still relies on XAML infrastructure. If your goal is to avoid XAML entirely, it might be worth sharing why, as there may be a better-suited UI framework depending on your use case.