原生控件:
效果:
代码:
<Label Content="原生Label" HorizontalAlignment="Left" Margin="31,23,0,0" VerticalAlignment="Top" Width="100"/>
LabelInfo 皮肤效果
效果:
<Label Content="LabelDefault" HorizontalAlignment="Left" Margin="31,63,0,0" VerticalAlignment="Top" Style="{
StaticResource LabelInfo}" Width="100">
<Label Content="LabelInfo.Small" HorizontalAlignment="Left" Margin="160,103,0,0" VerticalAlignment="Top" Style="{
StaticResource LabelInfo.Small}" Width="100"/>
LabelDanger 皮肤效果
效果:
代码:
<Label Content="LabelDanger" HorizontalAlignment="Left" Margin="31,263,0,0" VerticalAlignment="Top" Style="{
StaticResource LabelDanger}" Width="100"/>
<Label Content="LabelDanger.Small" HorizontalAlignment="Left" Margin="160,263,0,0" VerticalAlignment="Top" Style="{
StaticResource LabelDanger.Small}" Width="100"/>
其它的Style皮肤样式
边框:BorderBrush控制样式 BorderThickness控件宽度
效果:
代码:
<Label Content="原生Label" Margin="0,30,0,0" VerticalAlignment="Top" Width="100" BorderBrush="{StaticResource SuccessBrush}" BorderThickness="1"/>
圆角:添加命名空间 xmlns:hc="https://handyorg.github.io/handycontrol"
效果:
代码:
<Label Content="原生Label" Margin="0,73,0,0" VerticalAlignment="Top" Width="100" hc:BorderElement.CornerRadius="20" />