样式 实例:<Window.Resources> <Style x:Key="BtnStyle"> <Setter Property="Button.Height" Value="5 ...
样式
实例:
<Window.Resources> <Style x:Key="BtnStyle"> <Setter Property="Button.Height" Value="50" /> <Setter Property="Button.Margin" Value="30" /> <Setter Property="Button.Background" Value="Beige" /> <Setter Property="Button.RenderTransform"> <Setter.Value> <RotateTransform Angle="45" /> </Setter.Value> </Setter> </Style></Window.Resources><WrapPanel x:Name="wrappanel" Margin="10"> <Button Content="btn1" Style="{StaticResource BtnStyle}" /> <Button Content="btn2" Style="{StaticResource BtnStyle}" /> <Button Content="btn3" Style="{StaticResource BtnStyle}" /></WrapPanel>
原标题:WPF学习之路(十四)样式和模板
关键词:wpf
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。