简体   繁体   中英

borderless wpf window behavior for .net 3.5

Does anyone know how to have a borderless wpf window in .Net 3.5 ?

Basically I am trying to have the same window as in mahapps metro but in .net 3.5. When I try to use the borderless behavior in the mentioned library, I get a thick dark border around right/bottom side of the window.

I want to avoid AllowsTransparency and use hook messages instead

如果你想完全摆脱边界,你必须将“WindowStyle”设置为“None”,将“ResizeMode”设置为“NoResize”或“CanMinimize”。

Try setting the ResizeMove to NoResize or CanMinimize . This will remove the border.

NoResize or CanMinimize gets rid of the nice drop shadow effect and I don't want to loose the resizing (with grip).

In that case you should implement your own shadow (not so hard - just put everything inside one Border with desirable margin and set the DropShadowEffect ). CanMinimize will still allow you to resize the window, but you must still implement your own resizing .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM