zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    C# 装箱原型
    C# 反射浅谈(一)
    javascript介绍(二)
    javascript介绍(一)
    C#中 托管资源和非托管资源
    varchar && nvarchar 闲谈
    高内聚&&低耦合
    【android】移植IOS视图响应陀螺仪交互行为
    【android】如何实现猿题库题目的排版
    开心工作标准的硬件环境
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1335643.html
Copyright © 2011-2022 走看看