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


C# TabControl.SetBinding方法代码示例

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


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

示例1: Get_PlanetInfoTabs_Items

 private static System.Collections.ObjectModel.ObservableCollection<object> Get_PlanetInfoTabs_Items() {
     System.Collections.ObjectModel.ObservableCollection<object> items = new System.Collections.ObjectModel.ObservableCollection<object>();
     // tabInfo element
     TabItem tabInfo = new TabItem();
     tabInfo.Name = "tabInfo";
     tabInfo.Header = "Information";
     // e_94 element
     Grid e_94 = new Grid();
     tabInfo.Content = e_94;
     e_94.Name = "e_94";
     e_94.IsHitTestVisible = false;
     ColumnDefinition col_e_94_0 = new ColumnDefinition();
     col_e_94_0.Width = new GridLength(0.4F, GridUnitType.Star);
     e_94.ColumnDefinitions.Add(col_e_94_0);
     ColumnDefinition col_e_94_1 = new ColumnDefinition();
     col_e_94_1.Width = new GridLength(1F, GridUnitType.Star);
     e_94.ColumnDefinitions.Add(col_e_94_1);
     Binding binding_e_94_DataContext = new Binding("InfoTabData");
     e_94.SetBinding(Grid.DataContextProperty, binding_e_94_DataContext);
     // e_95 element
     StackPanel e_95 = new StackPanel();
     e_94.Children.Add(e_95);
     e_95.Name = "e_95";
     e_95.Orientation = Orientation.Vertical;
     Grid.SetColumn(e_95, 0);
     // e_96 element
     TextBlock e_96 = new TextBlock();
     e_95.Children.Add(e_96);
     e_96.Name = "e_96";
     e_96.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_96_Text = new Binding("PNameText");
     e_96.SetBinding(TextBlock.TextProperty, binding_e_96_Text);
     // e_97 element
     TextBlock e_97 = new TextBlock();
     e_95.Children.Add(e_97);
     e_97.Name = "e_97";
     e_97.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_97_Text = new Binding("PTierText");
     e_97.SetBinding(TextBlock.TextProperty, binding_e_97_Text);
     // e_98 element
     TextBlock e_98 = new TextBlock();
     e_95.Children.Add(e_98);
     e_98.Name = "e_98";
     e_98.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_98_Text = new Binding("PSpeedText");
     e_98.SetBinding(TextBlock.TextProperty, binding_e_98_Text);
     // e_99 element
     TextBlock e_99 = new TextBlock();
     e_95.Children.Add(e_99);
     e_99.Name = "e_99";
     e_99.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_99_Text = new Binding("PDistanceText");
     e_99.SetBinding(TextBlock.TextProperty, binding_e_99_Text);
     // e_100 element
     TextBlock e_100 = new TextBlock();
     e_95.Children.Add(e_100);
     e_100.Name = "e_100";
     e_100.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_100_Text = new Binding("PHabitedText");
     e_100.SetBinding(TextBlock.TextProperty, binding_e_100_Text);
     // e_101 element
     TextBlock e_101 = new TextBlock();
     e_95.Children.Add(e_101);
     e_101.Name = "e_101";
     e_101.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_101_Text = new Binding("PPopulationText");
     e_101.SetBinding(TextBlock.TextProperty, binding_e_101_Text);
     // e_102 element
     TextBlock e_102 = new TextBlock();
     e_95.Children.Add(e_102);
     e_102.Name = "e_102";
     e_102.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_102_Text = new Binding("PPopIncRateText");
     e_102.SetBinding(TextBlock.TextProperty, binding_e_102_Text);
     // e_103 element
     TextBlock e_103 = new TextBlock();
     e_95.Children.Add(e_103);
     e_103.Name = "e_103";
     e_103.Margin = new Thickness(5F, 5F, 0F, 5F);
     Binding binding_e_103_Text = new Binding("POwnerText");
     e_103.SetBinding(TextBlock.TextProperty, binding_e_103_Text);
     // e_104 element
     StackPanel e_104 = new StackPanel();
     e_94.Children.Add(e_104);
     e_104.Name = "e_104";
     e_104.HorizontalAlignment = HorizontalAlignment.Right;
     Grid.SetColumn(e_104, 1);
     // e_105 element
     TextBlock e_105 = new TextBlock();
     e_104.Children.Add(e_105);
     e_105.Name = "e_105";
     e_105.Text = "Map";
     // e_106 element
     Image e_106 = new Image();
     e_104.Children.Add(e_106);
     e_106.Name = "e_106";
     Binding binding_e_106_Source = new Binding("MapImage");
     e_106.SetBinding(Image.SourceProperty, binding_e_106_Source);
     items.Add(tabInfo);
     // tabAdmin element
//.........这里部分代码省略.........
开发者ID:charbean,项目名称:StrategyClean,代码行数:101,代码来源:Root.xaml.cs


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