private static CustomPopupPlacement GetUpPopupPlacement(ComboBoxPopup popup, PositioningData data) { var upVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.UpVerticalOffset); var newY = upVerticalOffsetIndepent - data.PopupSize.Height + data.TargetSize.Height; return(new CustomPopupPlacement(new Point(data.OffsetX, newY), PopupPrimaryAxis.None)); }
private static CustomPopupPlacement GetClassicPopupPlacement(ComboBoxPopup popup, PositioningData data) { var defaultVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.DefaultVerticalOffset); var newY = data.LocationY + data.PopupSize.Height > data.ScreenHeight ? -(defaultVerticalOffsetIndepent + data.PopupSize.Height) : defaultVerticalOffsetIndepent + data.TargetSize.Height; return(new CustomPopupPlacement(new Point(data.OffsetX, newY), PopupPrimaryAxis.Horizontal)); }
private static CustomPopupPlacement GetClassicPopupPlacement(ComboBoxPopup popup, PositioningData data) { var defaultVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.DefaultVerticalOffset); var newY = data.LocationY + data.PopupSize.Height > data.ScreenHeight ? -(defaultVerticalOffsetIndepent + data.PopupSize.Height) : defaultVerticalOffsetIndepent + data.TargetSize.Height; return new CustomPopupPlacement(new Point(data.OffsetX, newY), PopupPrimaryAxis.Horizontal); }
private static CustomPopupPlacement GetUpPopupPlacement(ComboBoxPopup popup, PositioningData data) { var upVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.UpVerticalOffset); var newY = upVerticalOffsetIndepent - data.PopupSize.Height + data.TargetSize.Height; return new CustomPopupPlacement(new Point(data.OffsetX, newY), PopupPrimaryAxis.None); }
private static CustomPopupPlacement GetDownPopupPlacement(ComboBoxPopup popup, PositioningData data) { var downVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.DownVerticalOffset); return new CustomPopupPlacement(new Point(data.OffsetX, downVerticalOffsetIndepent), PopupPrimaryAxis.None); }
private static CustomPopupPlacement GetDownPopupPlacement(ComboBoxPopup popup, PositioningData data) { var downVerticalOffsetIndepent = DpiHelper.TransformToDeviceY(data.MainVisual, popup.DownVerticalOffset); return(new CustomPopupPlacement(new Point(data.OffsetX, downVerticalOffsetIndepent), PopupPrimaryAxis.None)); }