To customize the title bar of a UWP app that uses secondary windows, use ApplicationView as described in Show multiple views with ApplicationView. The Windows.UI.WindowManagement.AppWindow class, used for secondary windows in UWP apps, does not support title bar customization. Write custom code to calculate and set drag rectangles, including when the window size changes. FeatureĪppWindowTitleBar.ExtendsContentIntoTitleBarÄefine your title bar in a XAML UIElement, then call SetTitleBar(UIElement). Use WinUI 3 Window titlebar customization APIs if you are creating a WinUI 3 desktop app that needs to run on OS versions prior to Windows 11. ![]() This table describes the differences between Window and AppWindow. However, title bar customization with AppWindow is supported only on Windows 11. You can pass the window handle of the XAML Window to the AppWindow object and use the AppWindow functionality in conjunction with the Window APIs (see the Windows App SDK tab). WinUI 3 is also part of the Windows App SDK, so both the Window class and the AppWindow class are available to customize the title bar. The Window class includes APIs that let you replace the standard title bar with your own custom content. ![]() ![]() Windowing functionality in WinUI 3 is through the Microsoft.UI.Xaml.Window class, which is based on the Win32 HWND model.
0 Comments
Leave a Reply. |