標籤:style blog class code java tar
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中的修改,紅色是添加的代碼
?
| 1 2 3 4 5 6 7 8 9 |
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" <span style="color: rgb(255, 0, 0);">xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"</span> x:Class="TestDemo.App" > <Application.Resources> <span style="color: rgb(255, 0, 0);"> <Style TargetType="Button"/></span> </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); }