Inheritance: System.Windows.Controls.Primitives.Popup
コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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));
        }