예제 #1
0
        public CustomPopupPlacement[] PlacePopup(Size popupSize,
                                                 Size targetSize,
                                                 Point offset)
        {
            var p          = TextButton.PointToScreen(new Point(0, 0));
            var placement1 =
                new CustomPopupPlacement(new Point(p.X + TextButton.ActualWidth / 2 - popupSize.Width / 2, p.Y - popupSize.Height), PopupPrimaryAxis.Vertical);

            var placement2 =
                new CustomPopupPlacement(new Point(10, 20), PopupPrimaryAxis.Horizontal);

            var ttplaces =
                new CustomPopupPlacement[] { placement1 };

            return(ttplaces);
        }