Fluent.ComboBox.CustomPopupPlacementMethod C# (CSharp) Method

CustomPopupPlacementMethod() private method

Implements custom placement for ribbon popup
private CustomPopupPlacementMethod ( Size popupsize, Size targetsize, Point offset ) : System.Windows.Controls.Primitives.CustomPopupPlacement[]
popupsize System.Windows.Size
targetsize System.Windows.Size
offset Point
return System.Windows.Controls.Primitives.CustomPopupPlacement[]
        CustomPopupPlacement[] CustomPopupPlacementMethod(Size popupsize, Size targetsize, Point offset)
        {
            if (popup != null)
            {
                Rect monitorRect = RibbonControl.GetControlMonitor(this);
                Point pos = PointToScreen(new Point());

                if (ShowPopupOnTop)
                {
                    return new CustomPopupPlacement[]
                               {
                                   new CustomPopupPlacement(new Point(0, -dropDownBorder.ActualHeight), PopupPrimaryAxis.Horizontal),                
                               };
                }
                else
                {

                    return new CustomPopupPlacement[]
                               {
                                   new CustomPopupPlacement(new Point(0, ActualHeight), PopupPrimaryAxis.Horizontal),                
                               };
                }
            }
            return null;
        }