• WPF Style的例子


    <Window.Resources>
        <Style TargetType="CheckBox">
          <Setter Property="Height" Value="20"/>
          <Setter Property="Width" Value="50"/>
          <EventSetter Event="Checked" Handler="Checked_Click"/>
          <Setter Property="VerticalAlignment" Value="Center"/> 
        </Style>    
    </Window.Resources>
     
    继承
    <Style BasedOn="{StaticResource {x:Type CheckBox}}"
               TargetType="CheckBox"
               x:Key="WiderCheckBox">
          <Setter Property="Width" Value="70"/>
    </Style>
     
    使用

    <CheckBox Style="{StaticResource WiderCheckBox}">Win</CheckBox>

  • 相关阅读:
    # GIT团队实战博客
    # ML学习小笔记—Where does the error come from?
    # Alpha冲刺3
    # Alpha冲刺2
    # Alpha冲刺1
    # ML学习小笔记—Linear Regression
    # 需求分析报告
    # 团队UML设计
    # 团队选题报告
    Alpha 冲刺 (4/10)
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1335643.html
Copyright © 2020-2023  润新知