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  窗体圆角

 

上一篇:Problem Set 1 - Convert an image from color to black and white(未更新完)


下一篇:从textarea中获取数据后按原样显示