public void SetChild(Vidget value) { var child = value.Backend.ToGtk(); if (child != null) { if (Widget.Child != child) { if (Widget.Child != null) { Widget.Remove(Widget.Child); } child.Show(); Widget.Child = GtkBackendHelper.EventsRootWidget(child); } } }
public void SetChild(Vidget value) { var child = value.ToSwf(); var parent = this.Control.GetCurrentParent(); var controlHost = new ToolbarItemHostBackend.ToolStripControlHost(child) { Size = child.Size, Overflow = ToolStripItemOverflow.AsNeeded, }; if (parent != null) { var i = parent.Items.IndexOf(this.Control); parent.SuspendLayout(); parent.Items.RemoveAt(i); parent.Items.Insert(i, controlHost); parent.ResumeLayout(); } this.Control = controlHost; }
public void SetChild(Vidget value) { Control.Children.Clear(); var child = value.Backend.ToWpf(); Control.Children.Add(child); child.HorizontalAlignment = HorizontalAlignment.Stretch; child.VerticalAlignment = VerticalAlignment.Stretch; child.Style = ToolbarUtils.ToolbarItemStyle(child); var xwtBackend = value.Backend as Limaki.View.XwtBackend.IXwtBackend; if (xwtBackend != null) { if (xwtBackend.Widget.WidthRequest >= 0) { Control.Width = xwtBackend.Widget.WidthRequest; } if (xwtBackend.Widget.HeightRequest >= 0) { Control.Height = xwtBackend.Widget.HeightRequest; } } Control.UpdateLayout(); }