• 使用Telerik StyleMananger 改变Silverlight Button样式


    Telerik 支持更改以下控件样式

    • System.Windows.Button
    • System.Windows.ScrollViewer
    • System.Windows.CheckBox
    • System.Windows.TextBox
    • System.Windows.RadioButton
    • System.Windows.ListBox
    • System.Windows.PasswordBox
    • System.Windows.RepeatButton
    • System.Windows.Tooltip

    需要在App.Xaml中的修改,红色是添加的代码

    <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 x:Class="TestDemo.App"
                 >
        <Application.Resources>
            <Style TargetType="Button"/>
        </Application.Resources>
    </Application>
    

     在后台程序中修改,其中红色是需要添加的代码

    public App()
          {
              this.Startup += this.Application_Startup;
              this.Exit += this.Application_Exit;
              this.UnhandledException += this.Application_UnhandledException;
              StyleManager.ApplicationTheme = new Windows7Theme();
              InitializeComponent();
             StyleManager.SetBasedOn(((Style)Current.Resources[typeof(Button)]), StyleManager.ApplicationTheme);
          }
  • 相关阅读:
    llinux文件相关指令
    移除元素【数组专题】
    移动零【数组专题】
    删除数组中重复的元素plus【数组专题】
    TCP超时重传时间的选择
    linux帮助指令
    各种缩写
    MyEclipse开发WebService教程(转)
    RMI 自己创建的 过程
    RMI简单实例 (转)
  • 原文地址:https://www.cnblogs.com/ZJ199012/p/3709657.html
Copyright © 2020-2023  润新知