Пример #1
0
		public override void AwakeFromNib()
		{
			base.AwakeFromNib();

			// Get native view for the panel
			// passing true so that we can embed, otherwise we just get a reference to the control
			var nativeView = new MyEtoPanel().ToNative(true);

			nativeView.AutoresizingMask = NSViewResizingMask.MinYMargin; // anchor to top left

			// position control, keeping auto size of control
			var contentFrame = Window.ContentView.Frame;
			nativeView.SetFrameOrigin(new PointF(100, contentFrame.Height - nativeView.Frame.Height - 100));

			Window.ContentView.AddSubview(nativeView);
		}
Пример #2
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            // Get native view for the panel
            // passing true so that we can embed, otherwise we just get a reference to the control
            var nativeView = new MyEtoPanel().ToNative(true);

            nativeView.AutoresizingMask = NSViewResizingMask.MinYMargin;             // anchor to top left

            // position control, keeping auto size of control
            var contentFrame = Window.ContentView.Frame;

            nativeView.SetFrameOrigin(new PointF(100, contentFrame.Height - nativeView.Frame.Height - 100));

            Window.ContentView.AddSubview(nativeView);
        }