zoukankan      html  css  js  c++  java
  • 如何自定义ToggleSwitch控件样式(转)

    打开Toolkit源码中的Generic.xaml文件可以看到其默认样式,发现接结构组成元素为:

    1. ToggleSwitch

      其中,ToggleSwitch又由以下几个部分组成:

      • Header
      • Content
      • ToogleSwitchButton
    2. ToogleSwitchButton

      ToggleSwitchButton由以若干个Grid和Boder组成,它们分别是:

      • Grid:SwitchRoot
      • Grid:SwitchTrack
      • Grid:SwitchBottom
      • Rectangle:SwitchBackground(包含两个Border,A和B)
      • Border:SwitchThumb
      • Border:ThumbCenter

    我们可以设置其各个元素显示不同的颜色,例如将各元素设为以下颜色:

    • Header.ForeGround – Blue
    • Content.ForeGround — Brown
    • ToggleSwitch.SwitchForeGround —Orange
    • SwitchRoot.Background — Black
    • SwitchTrack.Background — Green
    • SwitchBottom.Background — Green
    • SwitchBackground.BoderA.BorderBrush — Red
    • SwitchBackground.BoderA.BorderBrush — White
    • SwitchThumb.BorderBrush — Gold
    • ThumbCenter.BorderBrush — Aqua
    • ThumbCenter.Background — Chocolate
  • 相关阅读:
    C#调用C++ ---参数传递
    Retained Mode Versus Immediate Mode
    mind map in latex
    vk example
    基本环境
    [转]ld 和 ld.gold 和 ld.bfd
    [转] c++11 int&& 右值引用
    [转] c++11列表初始化
    [转] c++ const, volatile, mutable用法
    [转] c++11 模板元编程
  • 原文地址:https://www.cnblogs.com/hebeiDGL/p/2544805.html
Copyright © 2011-2022 走看看