WPF非矩形窗口实现
一个简单非矩形窗口的实现代码如下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<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得到。
作者:绿茶叶
出处:http://www.cnblogs.com/greenteaone/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。