Пример #1
0
		void IWindowBackend.SetChild (IWidgetBackend child)
		{
			if (this.child != null) {
				ViewBackend.RemoveChildPlacement (this.child.Widget);
				this.child.Widget.RemoveFromSuperview ();
				childView = null;
			}
			this.child = (ViewBackend) child;
			if (child != null) {
				childView = ViewBackend.GetWidgetWithPlacement (child);
				ContentView.AddSubview (childView);
				LayoutWindow ();
				childView.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
			}
		}
Пример #2
0
 protected virtual void SetChild(IWidgetBackend child)
 {
     if (this.child != null) {
         ViewBackend.RemoveChildPlacement (this.child.Widget);
         this.child.Widget.RemoveFromSuperview ();
     }
     this.child = (ViewBackend) child;
     if (child != null) {
         var w = ViewBackend.GetWidgetWithPlacement (child);
         GetContentView ().AddSubview (w);
         SetPadding (frontend.Padding.Left, frontend.Padding.Top, frontend.Padding.Right, frontend.Padding.Bottom);
         w.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
     }
 }