This is a migrated thread and some comments may be shown as answers.

Aligning popup of RadPopupEditor.

1 Answer 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
laimonassutkus
Top achievements
Rank 1
laimonassutkus asked on 20 Jul 2017, 06:38 AM

Hi,

I want to align my popup to snap the left or the right corner of its RadPopupEditor item. (See the picture for more details).

As you can see the popup is not aligned neither to the left nor to the right. How can I control the behaviour of the popup?

Things i have tried so far:

            popUpEditorConnect.PopupEditorElement.Alignment = ContentAlignment.TopLeft;             popUpEditorConnect.Popup.AlignmentRectangleOverlapMode = AlternativeCorrectionMode.Flip;             popUpEditorConnect.Popup.DropDownAnimationDirection = RadDirection.Left;             popUpEditorConnect.Popup.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToEdges;              popUpEditorConnect.Popup.HorizontalPopupAlignment = HorizontalPopupAlignment.LeftToLeft;

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 20 Jul 2017, 01:20 PM
Hello Laimonas,

Thank you for writing.

You can change the location of the popup by handling the PopupOpening event. Please check my code snippet below: 
private void RadPopupEditor1_PopupOpening(object sender, CancelEventArgs e)
{
    RadPopupOpeningEventArgs args = (RadPopupOpeningEventArgs)e;
    int width = radPopupEditor1.PopupForm.Width - radPopupEditor1.Width;
    args.CustomLocation = new Point(args.CustomLocation.X - width, args.CustomLocation.Y);
}

I hope this helps. Please let me know if you need further assistance.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
laimonassutkus
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or