public void AddToWindow(IVindow vindow) { var xwtWindow = vindow.Backend as Xwt.Window; var windowBackend = xwtWindow.GetBackend() as Xwt.GtkBackend.WindowBackend; var toolbarBackend = this.ToGtk(); var mainBox = windowBackend.MainBox; mainBox.PackStart(toolbarBackend, false, false, 0); ((Gtk.Box.BoxChild)mainBox[toolbarBackend]).Position = 1; mainBox.ShowAll(); }
void ComposeAbout(IVindow window) { var backend = window.Backend as Window; backend.Title = $"about {About.ApplicationName}"; VBox box = null; Label aboutLabel = null; if (backend.Content != null) { box = backend.Content as VBox; if (box != null) { aboutLabel = box.Children.FirstOrDefault(c => c.Name == nameof(aboutLabel)) as Label; if (aboutLabel != null) { aboutLabel.Text = About.ToString(); } } return; } ; backend.CloseRequested += (s, e) => { e.AllowClose = false; backend.Hide(); }; backend.Padding = 2; backend.TransientFor = MainWindow.Backend as Window; aboutLabel = new Label { Name = nameof(aboutLabel), Text = About.ToString(), TextColor = Colors.Black, TextAlignment = Alignment.Start, }; box = new VBox { Spacing = 2 }; box.PackStart(aboutLabel); backend.Content = box; }
public void AddToWindow(IVindow vindow) { }
public virtual void InitializeBackend(IVidget frontend, VidgetApplicationContext context) { this.Frontend = frontend as IVindow; }