public void Show(Xwt.Popover.Position orientation, Xwt.Widget referenceWidget, Xwt.Rectangle positionRect, Xwt.Widget child)
        {
            popover = MakePopover (child, BackgroundColor);
            ViewBackend backend = (ViewBackend)Toolkit.GetBackend (referenceWidget);
            var reference = backend.Widget;

            // If the position rect is empty, the coordinates of the rect will be ignored.
            // Width and Height of the rect must be > Epsilon, for the positioning to function correctly.
            if (Math.Abs (positionRect.Width) < double.Epsilon)
                positionRect.Width = 1;
            if (Math.Abs (positionRect.Height) < double.Epsilon)
                positionRect.Height = 1;

            popover.Show (positionRect.ToRectangleF (),
                          reference,
                          ToRectEdge (orientation));
        }
Example #2
0
		public void Show (Xwt.Popover.Position orientation, Xwt.Widget referenceWidget, Xwt.Rectangle positionRect, Xwt.Widget child)
		{
			popover = MakePopover (child);
			ViewBackend backend = (ViewBackend)Toolkit.GetBackend (referenceWidget);
			var reference = backend.Widget;
			popover.Show (positionRect.ToRectangleF (),
			              reference,
			              ToRectEdge (orientation));
		}
Example #3
0
 public void Show(Xwt.Popover.Position orientation, Xwt.Widget referenceWidget, Xwt.Rectangle positionRect, Xwt.Widget child)
 {
     var controller = new FactoryViewController (child);
     popover = new NSPopover ();
     popover.Behavior = NSPopoverBehavior.Transient;
     popover.ContentViewController = controller;
     ViewBackend backend = (ViewBackend)Toolkit.GetBackend (referenceWidget);
     var reference = backend.Widget;
     popover.Show (positionRect.ToRectangleF (),
                   reference,
                   ToRectEdge (orientation));
 }