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>

  • 相关阅读:
    今日成长笔记2016-11-18
    牛人博客
    c 、c++、java区别
    Java开发中的23种设计模式详解
    JAVA编程规范
    设计及编码质量改进之降低耦合度
    加密
    敏捷开发之Scrum扫盲篇
    RPC
    李洪强iOS开发Swift篇—04_运算符
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1335643.html
Copyright © 2011-2022 走看看