一个简单非矩形窗口的实现代码如下:

<Window x:Class="grid_Study.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" AllowsTransparency="True"
WindowStyle="None" Background="Transparent" >
<Border Width="Auto" Height="Auto" Name="windowFrame" Background="LightBlue"
BorderBrush="#395984" BorderThickness="1" CornerRadius="80">
</Border>
</Window>
窗体的四个角为圆角,通过设置属性CornerRadius得到。