Loading Ribbon Theme from seperate XAML File

Ribbon for WPF Forum

Posted 14 years ago by Doraiswamy
Version: 10.1.0521
Avatar
Hi,

I have two questions and i am new to XAML.

1. How to load the built in theme from seperate XAML file - for Ex. "Office2007Black"
i could able to do it in code behind file using ThemeManager.CurrentTheme = CommonThemeName.Office2007Black. But i want to know whether the above is possible.

2. I could able to tint the color from a existing theme.But can i design a complete new theme and load from seperate XAMl file.If so kindly let me know with an example.

And for Docking control i could easily load from seperate xaml getgin its path using locationuri and load resources.

Regards,
Balaji

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

1. You can't set the ThemeManager.CurrentTheme property from XAML, as XAML doesn't support that.

2. You can certainly build your own custom themes, but it's generally not a trivial task. In addition, any customizations you would make in the Ribbon product would not be reflected in any other WPF controls (native or Actipro). Our Sample Browser includes a simple example under the Shared Library section, titled "Using ThemeManager w/Custom Control". The same concepts apply to our WPF controls.

In addition, you could take the Ribbon XAML files and use them as a basis, which makes it easier to tweak just a few things. Finally, you can also just customize the brushes used by Ribbon, instead of trying to do a full theme. Using the Theme Browser in our Sample Browser under the General section, you can view/copy all the brushes used by Ribbon for the various themes.

3. You can perform the same operations for Docking & MDI, but again building a full theme isn't trivial.


Actipro Software Support

Posted 14 years ago by Doraiswamy
Avatar
Thank you for valuable suggestions.
Can you please let me know the path where i could find the Ribbon XAML files.

Regards,
G.Doraiswamy
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

If you purchased WPF Studio, then the XAML Styles are available on our website under your account (look in Organization Purchases). If you purchased Ribbon seperately or as part of WPF Essentials, then please send an email to our support address and we can provide the appropriate files.


Actipro Software Support

Posted 14 years ago by Doraiswamy
Avatar
I got the XAML styles for ribbon but when i add the Theme folder to my project it shows error like "type reference cannot find public type named RibbonWindowTitleBarButton" etc., For ex if want to make some solid brush style change on "Office2007Blue" Theme.
Kindly let me know the basic XAML files i need to include in my project so that i can customize the Ribbon XAML files to my color.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

If you just want to change the brushes used, then you don't need to include the XAML files. We use ComponentResourceKeys for our brushes, which allows you to override them. You can use the Theme Browser to view the brushes and copy their keys. Then you'd put your customized version in your application resources. See the "Utilities\Theme Browser" topic in our help file.

If you want to build an all new theme, then you would need to customize the Ribbon XAML files. You can find more information on this in the "Actipro Shared Library\Themes" topic of our help file, or the sample referred to earlier. Again, this isn't a trival task, so you need to do more than just include the XAML files and tweak them. You need to register your custom theme with the ThemeManager, and change the current theme.

Your best bet would be to pick the theme closest to the one you want, then remove the xaml files that are not used (i.e. if you use Office 2007 Blue as your basis, then remove any Aero, Classic, etc files).

Based on the error, it sounds like you don't have a reference to the 2010.1 build 0521 version of the Ribbon assembly.


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.