Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using the below
C#
this.Resources.MergedDictionaries.Add(PopularApplicationSkins.Office2007Black);

throws below error
The type or namespace name 'PopularApplicationSkins' does not exist in the namespace 'Microsoft.Windows.Controls.Ribbon'
Posted
Updated 17-Jan-12 2:20am
v2

1 solution

Check your version of the Ribbon library. If you are using a version from 2010 or later, the themes are no longer present in the namespace nor does the ribbon support the themes anymore. MSDN's reference documentation no longer references the themes in the Ribbon's documentation.

I believe the only workaround is a third-party ribbon control that does support themes or to override the default style and define the theme in xaml.
 
Share this answer
 
Comments
Francis Pradeep Kumar 18-Jan-12 7:02am    
Thanks Jason, One more question

is the <ribboncommand> tag also removed from the latest version of Ribbon Library ????

See the below code sample, it throws error as "The type r:RibbonCommand is not found".

<r:ribbongroup>
<r:ribbongroup.command>
<r:ribboncommand labeltitle="Clipboard"
smallimagesource="images/clipboard.png">

<r:ribbonbutton command="{StaticResource CutCommand}">
<r:ribbonbutton command="{StaticResource CopyCommand}">
<r:ribbonbutton command="{StaticResource PasteCommand}">
Jason Gleim 18-Jan-12 8:58am    
I didn't see a code sample. However, the error message looks like a xaml namespace problem. Is the 'r' namespace defined at the top of the xaml in the usercontrol or resource dictionary opening tag?

You can also open the RibbonControl library in the object browser to see all the properties, methods, and classes exposed in that namespace. that might be helpful as well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900