wpf 窗体圆角

首先将WindowStyle样式设置为none,AllowTransParency为TrueBackGround为TransparentOpacityMask为White

 WindowStyle="None" Background="Transparent" OpacityMask="White"  AllowsTransparency="True" ResizeMode="NoResize"

wpf  窗体圆角

 

 其次将grid加一个boder,方便加圆角就可以了


<Border Background="White" Height="192" Width="169" BorderThickness="1" BorderBrush="red" CornerRadius="4,4,4,4" Name="top">

<Border.Effect>

<DropShadowEffect ShadowDepth="0" Color="White" BlurRadius="4"/>
</Border.Effect>
<Label Margin="50,50,0,0">窗体圆角</Label>
</Border>

 

效果图:

wpf  窗体圆角

 

wpf 窗体圆角

上一篇:试读《JavaScript语言精髓与编程实践》


下一篇:JavaScript实现Map、Reduce和Filter