zoukankan      html  css  js  c++  java
  • redcontrol for SL 中文化及样式选择

    app.xaml.cs

    public partial class App: Application
       {

           public App()
           {

               //指定theme样色
               StyleManager.ApplicationTheme = new Windows8TouchTheme();

               this.Startup += this.Application_Startup;
               this.Exit += this.Application_Exit;
               this.UnhandledException += this.Application_UnhandledException;

               InitializeComponent();
           }

           private void Application_Startup(object sender, StartupEventArgs e)
           {

               //自定义中文化管理器
               LocalizationManager.Manager = new CustomLocalizationManager();

               this.RootVisual = new MainPage();
           }

    自定义样色管理器类

    public class CustomLocalizationManager : LocalizationManager
        {
            public override string GetStringOverride(string key)
            {
                switch (key)
                {
                    case "GridViewGroupPanelText":
                        return "拖放列名到此可进行分组排列.";
                    //---------------------- RadGridView Filter Dropdown items texts:
                    case "GridViewClearFilter":
                        return "清空";
                    case "GridViewFilterShowRowsWithValueThat":
                        return "以下是以条件方式过滤";
                    case "GridViewFilterSelectAll":
                        return "全选";
                    case "GridViewFilterContains":
                        return "包含";
                    case "GridViewFilterEndsWith":
                        return "结尾";
                    case "GridViewFilterIsContainedIn":
                        return "包含在";
                    case "GridViewFilterIsEqualTo":
                        return "等于";
                    case "GridViewFilterIsGreaterThan":
                        return "大于";
                    case "GridViewFilterIsGreaterThanOrEqualTo":
                        return "大于或等于";
                    case "GridViewFilterIsLessThan":
                        return "小于";
                    case "GridViewFilterIsLessThanOrEqualTo":
                        return "小于或等于";
                    case "GridViewFilterIsNotEqualTo":
                        return "不等于";
                    case "GridViewFilterStartsWith":
                        return "开头";
                    case "GridViewFilterAnd":
                        return "和";
                    case "GridViewFilterOr":
                        return "或者";
                    case "GridViewFilter":
                        return "过滤";
                }
                return base.GetStringOverride(key);
            }
        }

    以下是简单的运行后效果:

    image

  • 相关阅读:
    作业17
    模块
    Find the Lost Sock (异或算法)
    CD(二分)
    数字流输入
    最大连续子序列(dp)
    STL学习----lower_bound和upper_bound算法
    输入挂(减少时间)
    暴力之全排列
    【C++】判断元素是否在vector中,对vector去重,两个vector求交集、并集
  • 原文地址:https://www.cnblogs.com/jacle169/p/3459915.html
Copyright © 2011-2022 走看看