RadRibbonBarGroup DropDownElement DropDownMenu - popup is displayed on the left side of screen for the first click

1 Answer 78 Views
RibbonBar
Dmitry
Top achievements
Rank 1
Dmitry asked on 01 Feb 2022, 03:55 PM
The problem was that this popup is stretched to fit the entire screen. I've added a few lines of code to set the maximum size of this popup and it works fine. However, for the first click, popup is aligned to the left corner of the screen. I tried to set Location property of DropDownMenu and DropDownMenu.PopupElement, but it didn't help.

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Feb 2022, 12:18 PM
Hello, Dmitry,   

I would like to note that the AutoScroll property is inherited by the Control class and it is intended to display the default WinForms scrollbars. This will bring different look and feel of the UI element for which you are enabling this kind of functionality which may not work as expected since it is inherited by the base class and not implemented functionality by the Telerik Presentation Framework.

As to the question about the position of the drop down, note that it is intended to be shown just below the left bottom border of the group. if you want to adjust its position, feel free to use the demonstrated approach below:  
        public RadForm1()
        {
            InitializeComponent();
             
            this.radRibbonBarGroup1.DropDownElement.DropDownOpened+=DropDownElement_DropDownOpened; 
        }

        private void DropDownElement_DropDownOpened(object sender, EventArgs e)
        {
            this.radRibbonBarGroup1.DropDownElement.DropDownMenu.Location = new Point(100, 100);
            this.radRibbonBarGroup1.DropDownElement.DropDownMenu.LocationChanged += Popup_LocationChanged;
        }
        private void Popup_LocationChanged(object sender, EventArgs e)
        {
            RadRibbonBarGroupDropDownMenu form = sender as RadRibbonBarGroupDropDownMenu;
            if (form != null)
            {
                this.radRibbonBarGroup1.DropDownElement.DropDownMenu.LocationChanged -= Popup_LocationChanged;
                form.Location = new Point(100,100);
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
RibbonBar
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or