Simpleįor simple customization, such as changing the title bar color, you can set properties on the AppWindowTitleBar object to specify the colors you want to use for title bar elements. There are two levels of customization that you can apply to the title bar: apply minor modifications to the default title bar, or extend your app canvas into the title bar area and provide completely custom content. For more about the interop APIs, see Manage app windows - UI framework and HWND interop and the Windowing gallery sample. If you're not using WinUI 3 1.3 or later, use interop APIs to get the AppWindow and use the AppWindow APIs to customize the title bar. To access additional features of the title bar, you can use the AppWindow APIs from your XAML Window like this: = Colors.White. With this AppWindow object you have access to the title bar customization APIs. Use the Window.AppWindow property to get an AppWindow object from an existing XAML window. Starting in Windows App SDK 1.4, the XAML Window and AppWindow use the same AppWindowTitleBar object for title bar customization. If you use WinUI 3 XAML as your app's UI framework, both the Window and the AppWindow APIs are available to you. You can use AppWindow APIs with any UI framework that the Windows App SDK supports - Win32, WPF, WinForms, or WinUI 3 - and you can adopt them incrementally, using only the APIs you need. For XAML apps that use WinUI 3, XAML Window APIs provide a simpler way to customize the title bar, while still letting you access the AppWindow APIs when needed. Windowing functionality in WinUI 3 is through the Microsoft.UI.Xaml.Window class, which is also based on the Win32 HWND model. You can modify the default title bar that Windows provides so that it blends with the rest of your UI, or extend your app canvas into the title bar area and provide your own title bar content. AppWindow and its related classes provide APIs that let you manage many aspects of your app's top-level windows, including customization of the title bar. There's a 1:1 mapping between an AppWindow and a top-level HWND in your app. Windowing functionality in the Windows App SDK is through the Microsoft.UI.Windowing.AppWindow class, which is based on the Win32 HWND model.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |