private CustomPopupPlacementMethod ( |
||
popupsize | ||
targetsize | ||
offset | Point | |
리턴 | 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;
}