您的位置:首页 > 其它

WPF非矩形窗口实现

2010-12-15 15:32 169 查看
一个简单非矩形窗口的实现代码如下:

代码

<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得到。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: