public static ToolbarButton AddControlTo(TabViewer tabViewer) { tabViewer.Toolbar.AddSeparator(); ToolbarButton snapshotButton = tabViewer.Toolbar.AddButton("Snapshot", Icons.Streams.Screenshot); snapshotButton.Click += (s, e) => { var screenCapture = new ScreenCapture(tabViewer, tabViewer.ScrollViewer); tabViewer.SetContent(screenCapture); }; return(snapshotButton); }
// Load here instead of in xaml for better control private void InitializeComponent() { Title = Project.ProjectSettings.Name ?? "<Name>"; Background = Theme.TabBackground; MinWidth = MinWindowSize; MinHeight = MinWindowSize; Icon = new WindowIcon(Icons.Streams.Logo); Content = TabViewer = new TabViewer(Project); PositionChanged += BaseWindow_PositionChanged; this.GetObservable(ClientSizeProperty).Subscribe(Resize); }
public ScreenCapture(TabViewer tabViewer, IVisual visual) { TabViewer = tabViewer; InitializeComponent(visual); }
public ScreenCaptureToolbar(TabViewer tabViewer) : base(null) { TabViewer = tabViewer; InitializeControls(); }
public TabViewerToolbar(TabViewer tabViewer) : base(null) { TabViewer = tabViewer; InitializeControls(); }
public TabViewer(Project project) { BaseViewer = this; LoadProject(project); }