Comments (5)
With 1.4, I use OverlappedPresenter.SetBorderAndTitleBar(false, false)
and OverlappedPresenter.IsResizable = false (removes WS_THICKFRAME)
from microsoft-ui-xaml.
With 1.4, I use OverlappedPresenter.SetBorderAndTitleBar(false, false)在 1.4 中,我使用 OverlappedPresenter.SetBorderAndTitleBar(false, false) and OverlappedPresenter.IsResizable = false (removes WS_THICKFRAME)和 OverlappedPresenter.IsResizable = false(删除WS_THICKFRAME)
It works on 1.5.4 too, but how can I resize the window?Must I create a small triangle in the corner by myself?
from microsoft-ui-xaml.
It works on 1.5.4 too, but how can I resize the window?Must I create a small triangle in the corner by myself?
A way is to let it resizable and subclass it (SetWindowSubclass) to handle WM_NCCALCSIZE (mainly to increment the first RECT.top to reduce the size of top border)
I tested on Windows 10 and I had to increment left and decrement right and bottom too (quick test with random values, should be calculated with APIs like AdjustWindowRect...) and set lParam to -1 in WM_NCACTIVATE, as MSDN says... and also SetWindowPos in Activated event for the first time the window is displayed) :
from microsoft-ui-xaml.
It works on 1.5.4 too, but how can I resize the window?Must I create a small triangle in the corner by myself?它也适用于 1.5.4,但是如何调整窗口大小?我必须自己在角落里创建一个小三角形吗?
A way is to let it resizable and subclass it (SetWindowSubclass) to handle WM_NCCALCSIZE (mainly to increment the first RECT.top to reduce the size of top border)一种方法是让它可调整大小并对其进行子类化 (SetWindowSubclass) 以处理WM_NCCALCSIZE(主要是增加第一个 RECT.top 以减小顶部边框的大小) I tested on Windows 10 and I had to increment left and decrement right and bottom too (quick test with random values, should be calculated with APIs like AdjustWindowRect...) and set lParam to -1 in WM_NCACTIVATE, as MSDN says... and also SetWindowPos in Activated event for the first time the window is displayed) :我在 Windows 10 上进行了测试,我也必须向左递增,向右递减右键和下键(使用随机值进行快速测试,应该使用 AdjustWindowRect 等 API 进行计算...)并在 WM_NCACTIVATE 年将 lParam 设置为 -1,正如 MSDN 所说......以及首次显示窗口时激活事件中的 SetWindowPos):
Hey bro. I just found a perfect way.It looks like the following:
This code would totally hide the title bar and the three caption buttons, but preserve a 32 or maybe 48 px rectangle overlay that is draggable and transparent.And you can use SetTitleBar(rootGrid); and set it to be interactive, then you can pretend the rootGrid is the content of a no-titlebar-window.
MS Learn Document
Here is the code.
public DockWindow() { this.InitializeComponent(); ExtendsContentIntoTitleBar = true; SetTitleBar(Part_TitleBar); var TestTitleBar = AppWindow.TitleBar; **TestTitleBar.PreferredHeightOption = TitleBarHeightOption.Collapsed;** }
from microsoft-ui-xaml.
It sounds like this has been solved.
from microsoft-ui-xaml.
Related Issues (20)
- NavigationView SelectedItem indicator gone when toggling PaneDisplayMode HOT 3
- XamlCompiler.exe needs better logs
- Keyboard Shortcuts absorbed by TextBox
- Two identical syncronized <ScrollViewer> components don't align HOT 6
- ScrollViewer: Users cannot hold the mouse wheel to pan HOT 1
- `XamlMarkupHelper.UnloadObject` gives exception HOT 3
- CommandBarFlyout Failed to Follow System Theme Change HOT 2
- Issue restoring a maximized window using `OverlappedPresenter.Restore(true)` HOT 1
- Microsoft.UI.Xaml.Markup.XamlParseException: 'The text associated with this error code could not be found. HOT 5
- ListView Width="*" in header and item not equal on different resolutions.
- WinUI3 Gallery becomes unresponsive when sliders are moved quickly
- NumberBox displays double 3.12 as 3.1999999999..... HOT 4
- DebugSettings.LayoutCycleTracingLevel throws InvalidCastException HOT 1
- Winui3 packaged app not available for assigned access (kiosk mode) HOT 1
- ToggleSwitch related text is Off and visual state is On when Frame navigation is executed
- MenuFlyout leaves unclickable region after main app has been minimized and restored via task bar
- New TitleBar Control can not set TitleBar.PreferredHeightOption: The group or resource is not in the correct state to perform the requested operation.
- An improper shadow appears at the bottom of the CommandBarOverflowPresenter. HOT 1
- Enabling "PublishSingleFile" may causes "ResourceManager.Current" to throw an error HOT 2
- Error is API docs of UIElement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-ui-xaml.