Silverlight Telerik 学习之主题的设置
2020-11-15 06:07
                         标签:com   http   blog   style   class   div   img   code   java   javascript   tar    Telerik控件版本:RadControls for Silverlight Q1 2013 当前的Telerik Silverlight 控件支持以下主题 Office Black - 这是默认主题,无需加载其它任何dll文件。 Office Blue - 引用 Telerik.Windows.Themes.Office_Blue.dll。 Office Silver - 引用 Telerik.Windows.Themes.Office_Silver.dll。 Summer - 引用 Telerik.Windows.Themes.Summer.dll。 Transparent - 引用 Telerik.Windows.Themes.Transparent.dll。 Vista - 引用 Telerik.Windows.Themes.Vista.dll。 Windows 7 - 引用 Telerik.Windows.Themes.Windows7.dll。 Window 8 - 引用Telerik.Windows.Themes.Windows8.dll。 Windows8 Touch 
-引用Telerik.Windows.Themes.Windows8Touch。 Metro(obsolete) - 引用Telerik.Windows.Themes.Metro.dll。应该替换成windows8主题。 创建一个Silverlight工程,引用需要的dll 下图是Windows8 Touch的效果 1.设置特定的XAML内置样式(这样只改变指定控件样式) 或者通过后台代码控制 StyleManager.SetTheme( tab1, new VistaTheme() ); 2.设置应用程序内置主题后台代码(这样影响的是页面控件的样式) 或者 3.自定义主题 如果觉得这些样式满足不了要求可以自己定义一些主题 创建一个自定义主题类 然后在自定义主题类的构造函数中指定source 参考文章 
http://www.telerik.com/help/silverlight/common-styling-apperance-setting-theme.html   Silverlight Telerik 学习之主题的设置,搜素材,soscw.com Silverlight Telerik 学习之主题的设置 标签:com   http   blog   style   class   div   img   code   java   javascript   tar    原文地址:http://www.cnblogs.com/ZJ199012/p/3696906.html
 
       
    
       
"Test.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">
    "LayoutRoot">       "tab1"  
telerik:StyleManager.Theme="Windows8Touch">            "导航一">            "导航二">            "导航三">        
    

public partial class MainPage : UserControl
    {
        public MainPage()
        {
            StyleManager.ApplicationTheme = new Windows8TouchTheme();
            InitializeComponent();
        }
        
    }


public partial class App : Application
{
    public App()
    {
        this.Startup += this.Application_Startup;
        this.Exit += this.Application_Exit;
        this.UnhandledException += this.Application_UnhandledException;
        StyleManager.ApplicationTheme = new Windows8TouchTheme();
        InitializeComponent();
    }
}


[ThemeLocation( ThemeLocation.BuiltIn )]
public class CustomTheme : Telerik.Windows.Controls.Theme
{
}


public CustomTheme()
{
    this.Source = new Uri( "/Telerik.Windows.Themes.CustomTheme;component/themes/Generic.xaml", UriKind.Relative );
}

文章标题:Silverlight Telerik 学习之主题的设置
文章链接:http://soscw.com/index.php/essay/21395.html