public MemberPropertiesControl() { TabCtrl = new RanetTabControl(); PropertiesCtrl = new PropertiesListControl(); TabItem PropertiesTab = new TabItem(); PropertiesTab.Header = Localization.Properties; PropertiesTab.Style = TabCtrl.Resources["TabControlOutputItem"] as Style; PropertiesTab.Content = PropertiesCtrl; TabCtrl.TabCtrl.Items.Add(PropertiesTab); PropertiesTab.Header = Localization.Properties; TabToolBar toolBar = TabCtrl.ToolBar; if (toolBar != null) { RanetToolBarButton copyBtn = new RanetToolBarButton(); ToolTipService.SetToolTip(copyBtn, Localization.CopyToClipboard_ToolTip); copyBtn.Content = UiHelper.CreateIcon(UriResources.Images.Copy16); toolBar.Stack.Children.Add(copyBtn); copyBtn.Click += new RoutedEventHandler(CopyButton_Click); } this.Content = TabCtrl; }
public PropertiesControl() { LayoutRoot = new Grid(); LayoutRoot = new Grid(); LayoutRoot.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); LayoutRoot.RowDefinitions.Add(new RowDefinition()); m_PropertiesOwnerControl = new ContentControl(); m_PropertiesOwnerControl.Margin = new Thickness(3); m_PropertiesOwnerControl.VerticalAlignment = VerticalAlignment.Center; m_PropertiesOwnerControl.VerticalContentAlignment = VerticalAlignment.Center; m_PropertiesOwnerControl.Visibility = Visibility.Collapsed; LayoutRoot.Children.Add(m_PropertiesOwnerControl); m_PropertiesList = new PropertiesListControl(); m_PropertiesList.Margin = new Thickness(3); LayoutRoot.Children.Add(m_PropertiesList); Grid.SetRow(m_PropertiesList, 1); m_PropertiesList.Clear(); this.Content = LayoutRoot; }
public CellPropertiesControl() { InitializeComponent(); PropertiesCtrl = new PropertiesListControl(); TupleCtrl = new CellTupleControl(); TabItem PropertiesTab = new TabItem(); PropertiesTab.Header = Localization.Properties; PropertiesTab.Style = TabCtrl.Resources["TabControlOutputItem"] as Style; PropertiesTab.Content = PropertiesCtrl; TabItem TupleTab = new TabItem(); TupleTab.Header = Localization.Tuple; TupleTab.Style = TabCtrl.Resources["TabControlOutputItem"] as Style; TupleTab.Content = TupleCtrl; TabCtrl.TabCtrl.Items.Add(PropertiesTab); TabCtrl.TabCtrl.Items.Add(TupleTab); TupleCtrl.HierarchyColumn.Width = PropertiesCtrl.PropertyColumnWidth; TupleCtrl.MemberColumn.Width = PropertiesCtrl.ValueColumnWidth; PropertiesTab.Header = Localization.Properties; TupleTab.Header = Localization.Tuple; TabToolBar toolBar = TabCtrl.ToolBar; if (toolBar != null) { RanetToolBarButton copyBtn = new RanetToolBarButton(); ToolTipService.SetToolTip(copyBtn, Localization.CopyToClipboard_ToolTip); copyBtn.Content = UiHelper.CreateIcon(UriResources.Images.Copy16); toolBar.Stack.Children.Add(copyBtn); copyBtn.Click += new RoutedEventHandler(CopyButton_Click); } }