This is a migrated thread and some comments may be shown as answers.
Office 2010 theme and ribbons
5 Answers 50 Views
This is a migrated thread and some comments may be shown as answers.
tom
Top achievements
Rank 1
tom asked on 15 Aug 2011, 11:38 AM
Does anybody have the same problem with the Office 2010 Blue theme?
The position of the radRibbonBar.RibbonBarElement.ApplicationButtonElement is 2 pixels to low.
I am not sure if this behavior was also present in Q1 2011.
I have tried to correct it programtically by shifting the Location property, but it doesn't help.
Is there any solution without definining a custom theme?

5 Answers, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 17 Aug 2011, 02:41 PM
Hello Tom,

Thank you for your question.

The top Margin of ApplicationButtonElement defines its offset from the top of the RadRibbonBar control. In the Office2010Blue theme it is 32 pixels. You can use the following code to move the button 2 pixels above:
Padding currentMargin = this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin;
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin = new Padding(currentMargin.Left, 30, currentMargin.Right, currentMargin.Bottom);

I hope it helps.

Best regards,
Alexander
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
tom
Top achievements
Rank 1
answered on 17 Aug 2011, 03:25 PM
Hello Alexander,

Great, this works fine.

Thank you for the hotfix, but do you think this is an error in the Office 2010 theme?
Will this be corrected with the next update?

I am asking because, then I have to remove the manual correction.

Regards,
Tom

0
Alexander
Telerik team
answered on 19 Aug 2011, 09:39 AM
Hello Tom,

The issues of the Office2010 themes of RadRibbonBar you reported will be addressed in our next service pack. The manual correction will not be necessary then.

Best regards,
Alexander
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
tom
Top achievements
Rank 1
answered on 19 Aug 2011, 10:13 AM
Hello Alexander,

fine and thanks.

I have also find a problem with the QuickAccessToolbar. The left position of -63px is in my opinion to far left, I have choosen the value of -60px. You can see it best, if you maximize the RadRibbonForm.

currentMargin = this.radRibbonBar.RibbonBarElement.QuickAccessToolBar.Margin;
this.radRibbonBar.RibbonBarElement.QuickAccessToolBar.Margin = new Padding(-60,currentMargin.Top, currentMargin.Right, currentMargin.Bottom);

Best regards,
Tom
0
Accepted
Alexander
Telerik team
answered on 24 Aug 2011, 07:27 AM
Hello Tom,

Thank you for your feedback regarding RadRibbonBar themes. I will send it to our designers team.

Your solution for changing the Margin of QuickAccessToolBar in runtime works fine if the QuickAccessToolBar is located above the rest of the RadRibbonBar elements. If your application allows the user to choose the option for showing the toolBar below the other elements, you could handle it using the RadPropertyChanged event of RibbonBarElement and its QuickAccessToolbarBelowRibbonProperty property:

private void RibbonBarElement_RadPropertyChanged(object sender, RadPropertyChangedEventArgs e)
{
    if (e.Property == RadRibbonBarElement.QuickAccessToolbarBelowRibbonProperty)
    {
        if (!(bool)e.NewValue)
        {
            Padding currentMargin = this.radRibbonBar1.RibbonBarElement.QuickAccessToolBar.Margin;
            this.radRibbonBar1.RibbonBarElement.QuickAccessToolBar.Margin = new Padding(-60, currentMargin.Top, currentMargin.Right, currentMargin.Bottom);
        }
        else
        {
            // use the theme defined settings or choose your own Margin
            this.radRibbonBar1.RibbonBarElement.QuickAccessToolBar.ResetValue(RadElement.MarginProperty, ValueResetFlags.Local);
        }
    }
}

Let me know if you have further suggestions.
 
Best regards,
Alexander
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Asked by
tom
Top achievements
Rank 1
Answers by
Alexander
Telerik team
tom
Top achievements
Rank 1
Share this question
or