Skip to content

Latest commit

 

History

History
50 lines (27 loc) · 2.1 KB

README.md

File metadata and controls

50 lines (27 loc) · 2.1 KB

WinUI3WindowMenuStyle


基于 WinUI 风格的窗口菜单实现

Based on WinUI style window menu implementation


目前在 WinUI 3 框架中,我们可以通过 ExtendsContentIntoTitlebar 属性来自定义标题栏,然而在自定义标题栏后,点击窗口右键,窗口菜单还是 Win32 样式的。所以在本项目中,我们提供了一种基于 WinUI 风格的窗口菜单实现。

At present in the frame of the WinUI 3, we can through ExtendsContentIntoTitlebar properties to customize the title bar, however after a custom title bar, right click on the window, the window menu or Win32 style. So in this project, we provide a WinUI-style window menu implementation.


其他说明

1.需要设置 ExtendsContentIntoTitlebar = true 才能正常启用 WinUI 风格的窗口菜单
2.显示窗口菜单时,不仅需要处理鼠标或触摸屏/笔发出的操作,还需要处理键盘 Alt + Space 的按键操作

Other instructions

1. You need to set up ExtendsContentIntoTitlebar = true to enable properly WinUI style window menu
2. When displaying the window menu, you need to process not only the operation of the mouse or touch screen/pen, but also the operation of the Alt + Space key on the keyboard

参考资料(Reference)


示例图(Demo)

浅色模式(Light Mode)

image

深色模式(Dark Mode)

image