当前位置: 首页>>代码示例>>C#>>正文


C# TabItem.SetResourceReference方法代码示例

本文整理汇总了C#中TabItem.SetResourceReference方法的典型用法代码示例。如果您正苦于以下问题:C# TabItem.SetResourceReference方法的具体用法?C# TabItem.SetResourceReference怎么用?C# TabItem.SetResourceReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TabItem的用法示例。


在下文中一共展示了TabItem.SetResourceReference方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Get_e_24_Items

 private static System.Collections.ObjectModel.ObservableCollection<object> Get_e_24_Items() {
     System.Collections.ObjectModel.ObservableCollection<object> items = new System.Collections.ObjectModel.ObservableCollection<object>();
     // e_25 element
     TabItem e_25 = new TabItem();
     e_25.Name = "e_25";
     e_25.HorizontalContentAlignment = HorizontalAlignment.Stretch;
     e_25.SetResourceReference(TabItem.HeaderProperty, "GameText");
     // e_26 element
     Grid e_26 = new Grid();
     e_25.Content = e_26;
     e_26.Name = "e_26";
     e_26.Margin = new Thickness(10F, 10F, 10F, 10F);
     RowDefinition row_e_26_0 = new RowDefinition();
     row_e_26_0.Height = new GridLength(1F, GridUnitType.Auto);
     e_26.RowDefinitions.Add(row_e_26_0);
     RowDefinition row_e_26_1 = new RowDefinition();
     row_e_26_1.Height = new GridLength(1F, GridUnitType.Auto);
     e_26.RowDefinitions.Add(row_e_26_1);
     RowDefinition row_e_26_2 = new RowDefinition();
     row_e_26_2.Height = new GridLength(1F, GridUnitType.Auto);
     e_26.RowDefinitions.Add(row_e_26_2);
     RowDefinition row_e_26_3 = new RowDefinition();
     row_e_26_3.Height = new GridLength(1F, GridUnitType.Auto);
     e_26.RowDefinitions.Add(row_e_26_3);
     RowDefinition row_e_26_4 = new RowDefinition();
     row_e_26_4.Height = new GridLength(1F, GridUnitType.Auto);
     e_26.RowDefinitions.Add(row_e_26_4);
     ColumnDefinition col_e_26_0 = new ColumnDefinition();
     col_e_26_0.Width = new GridLength(58F, GridUnitType.Star);
     e_26.ColumnDefinitions.Add(col_e_26_0);
     ColumnDefinition col_e_26_1 = new ColumnDefinition();
     col_e_26_1.Width = new GridLength(134F, GridUnitType.Star);
     e_26.ColumnDefinitions.Add(col_e_26_1);
     ColumnDefinition col_e_26_2 = new ColumnDefinition();
     col_e_26_2.Width = new GridLength(193F, GridUnitType.Star);
     e_26.ColumnDefinitions.Add(col_e_26_2);
     ColumnDefinition col_e_26_3 = new ColumnDefinition();
     col_e_26_3.Width = new GridLength(192F, GridUnitType.Star);
     e_26.ColumnDefinitions.Add(col_e_26_3);
     ColumnDefinition col_e_26_4 = new ColumnDefinition();
     col_e_26_4.Width = new GridLength(193F, GridUnitType.Star);
     e_26.ColumnDefinitions.Add(col_e_26_4);
     // e_27 element
     TextBlock e_27 = new TextBlock();
     e_26.Children.Add(e_27);
     e_27.Name = "e_27";
     e_27.Margin = new Thickness(0F, 6F, 0F, 5F);
     e_27.VerticalAlignment = VerticalAlignment.Center;
     e_27.Foreground = new SolidColorBrush(new ColorW(255, 255, 255, 255));
     Grid.SetColumnSpan(e_27, 2);
     e_27.SetResourceReference(TextBlock.TextProperty, "DifficultyText");
     // cbDifficulty element
     ComboBox cbDifficulty = new ComboBox();
     e_26.Children.Add(cbDifficulty);
     cbDifficulty.Name = "cbDifficulty";
     cbDifficulty.Margin = new Thickness(2F, 2F, 2F, 3F);
     cbDifficulty.VerticalAlignment = VerticalAlignment.Center;
     cbDifficulty.ItemsSource = Get_cbDifficulty_Items();
     Grid.SetColumn(cbDifficulty, 2);
     Binding binding_cbDifficulty_SelectedIndex = new Binding("Difficulty");
     cbDifficulty.SetBinding(ComboBox.SelectedIndexProperty, binding_cbDifficulty_SelectedIndex);
     // e_31 element
     TextBlock e_31 = new TextBlock();
     e_26.Children.Add(e_31);
     e_31.Name = "e_31";
     e_31.Margin = new Thickness(0F, 6F, 0F, 5F);
     e_31.VerticalAlignment = VerticalAlignment.Center;
     e_31.Foreground = new SolidColorBrush(new ColorW(255, 255, 255, 255));
     Grid.SetRow(e_31, 1);
     Grid.SetColumnSpan(e_31, 2);
     e_31.SetResourceReference(TextBlock.TextProperty, "LanguageText");
     // cbLanguage element
     ComboBox cbLanguage = new ComboBox();
     e_26.Children.Add(cbLanguage);
     cbLanguage.Name = "cbLanguage";
     cbLanguage.Margin = new Thickness(2F, 3F, 2F, 2F);
     cbLanguage.VerticalAlignment = VerticalAlignment.Center;
     cbLanguage.ItemsSource = Get_cbLanguage_Items();
     Grid.SetColumn(cbLanguage, 2);
     Grid.SetRow(cbLanguage, 1);
     Binding binding_cbLanguage_SelectedIndex = new Binding("Language");
     cbLanguage.SetBinding(ComboBox.SelectedIndexProperty, binding_cbLanguage_SelectedIndex);
     items.Add(e_25);
     // e_36 element
     TabItem e_36 = new TabItem();
     e_36.Name = "e_36";
     e_36.SetResourceReference(TabItem.HeaderProperty, "VideoText");
     // e_37 element
     Grid e_37 = new Grid();
     e_36.Content = e_37;
     e_37.Name = "e_37";
     e_37.Margin = new Thickness(10F, 10F, 10F, 10F);
     RowDefinition row_e_37_0 = new RowDefinition();
     row_e_37_0.Height = new GridLength(1F, GridUnitType.Auto);
     e_37.RowDefinitions.Add(row_e_37_0);
     RowDefinition row_e_37_1 = new RowDefinition();
     row_e_37_1.Height = new GridLength(1F, GridUnitType.Auto);
     e_37.RowDefinitions.Add(row_e_37_1);
     RowDefinition row_e_37_2 = new RowDefinition();
     row_e_37_2.Height = new GridLength(1F, GridUnitType.Auto);
//.........这里部分代码省略.........
开发者ID:charbean,项目名称:StrategyClean,代码行数:101,代码来源:Options.xaml.cs


注:本文中的TabItem.SetResourceReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。