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

How to change StartMenu Direction to RTL

1 Answer 100 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
salhzmzm
Top achievements
Rank 1
salhzmzm asked on 16 Apr 2010, 07:33 PM
Hi

I have a picture in attachment section that shows a RadRibbon in RTL and a StartMenu in wrong direction and I want to change it to follow the Ribbon (RTL).

How I can do that?

1 Answer, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 22 Apr 2010, 12:53 PM
Hi Saleh,

Thanks for contacting us and for your question.

In fact, the direction of the Application Menu's popup should be automatically adjusted when you turn on the RightToLeft mode but the behavior that you encounter is an issue which we are already aware of, and which will be addressed for the upcoming SP2 we plan to release in a week or so.

I have managed to prepare a simple workaround for you, as well. Take a look at the following code snippet:

RadPopupOpeningEventArgs eventArgs = args as RadPopupOpeningEventArgs;
            this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.HorizontalPopupAlignment = HorizontalPopupAlignment.RightToRight;
            eventArgs.CustomLocation = this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.Location;

You can paste this code in the PopupOpening event of the Application Menu in the RadRibbonBar:

public Form1()
        {
            InitializeComponent();           this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.PopupOpening += new RadPopupOpeningEventHandler(DropDownMenu_PopupOpening);
        }
  
        void DropDownMenu_PopupOpening(object sender, CancelEventArgs args)
        {
            RadPopupOpeningEventArgs eventArgs = args as RadPopupOpeningEventArgs;
            this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.HorizontalPopupAlignment = HorizontalPopupAlignment.LeftToLeft;
            eventArgs.CustomLocation = this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.Location;
        }

I hope this is helpful.

Greetings,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
RibbonBar
Asked by
salhzmzm
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or