private void Initialize() { InitializeComponent(); this.diagnosticMargin = this.textViewHost.GetTextViewMargin(DiagnosticMargin.MarginName) as DiagnosticMargin; var outer = Items[0] as MenuItem; if (this.diagnosticMargin == null) { Label errorHeader = new Label(); errorHeader.Padding = new Thickness(0.0); errorHeader.Foreground = Brushes.Red; errorHeader.Content = "?"; outer.Header = errorHeader; outer.ToolTip = "Error constructing Diagnostic margin"; } else { for (int r = 0; r < this.factories.Count; ++r) { var item = new MenuItem(); item.IsCheckable = true; item.Header = this.factories[r].Metadata.Name; item.Click += this.diagnosticMargin.PanelManagers[r].Click; outer.Items.Add(item); } } this.isInitialized = true; }
public PanelManager(DiagnosticMargin margin, int rowNumber) { this.state = State.PreActive; this.margin = margin; this.rowNumber = rowNumber; }