簡體   English   中英

是否可以增加窗口的邊框區域以使用鼠標調整窗口大小?

[英]Is it possible to increase a window's border area for resizing the window with the mouse?

對於簡單的WPF窗口,是否可以增加鼠標可以調整窗口大小的區域? 例如:

試用版

邊界太細。 我嘗試了以下解決方法,但僅窗口的邊緣部分充當調整大小的區域:

  1. 增加窗口的BorderThickness
  2. 設置WS_THICKFRAME

您可以設置WindowStyle =“ None”並設置borderbrush和borderthickness以達到您的期望。

<Window x:Class="WpfApplication1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="100" Width="100" WindowStyle="None" BorderThickness="3" BorderBrush="Black" ResizeMode="CanResizeWithGrip" >
 Hello World
</Window>

希望對你有幫助!

或使用Wpf自定義窗口,Windows邊緣調整功能

WPF自定義窗口,Windows邊緣調整功能

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM