其他分享
首页 > 其他分享> > wpf 窗体圆角

wpf 窗体圆角

作者:互联网

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

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

 

 其次将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>

 

效果图:

 

标签:WindowStyle,圆角,Transparent,窗体,OpacityMask,wpf,True,White
来源: https://www.cnblogs.com/lovebear123/p/11731806.html