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); }