public YouTrackExplorerWindowRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, YouTrackExplorerWindowDescriptor descriptor) { this.lifetime = lifetime; toolWindowClass = toolWindowManager.Classes[descriptor]; toolWindowClass.RegisterEmptyContent( lifetime, lt => { // initialize the default ('empty') content for the tool window var label = new RichTextLabel { BackColor = SystemColors.Control, Dock = DockStyle.Fill }; label.RichTextBlock.Add(new RichText("Nothing Here", new TextStyle(FontStyle.Bold))); label.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter); return label.BindToLifetime(lt); }); }
public YouTrackExplorerWindowRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, YouTrackExplorerWindowDescriptor descriptor, IUIApplication application) { this.lifetime = lifetime; this.application = application; toolWindowClass = toolWindowManager.Classes[descriptor]; toolWindowClass.RegisterEmptyContent( lifetime, lt => { // initialize the default ('empty') content for the tool window var label = new RichTextLabel(application) { BackColor = SystemColors.Control, Dock = DockStyle.Fill }; label.RichTextBlock.Add(new RichText("Nothing Here", new TextStyle(FontStyle.Bold))); label.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter); return(label.BindToLifetime(lt)); }); }