Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Restyling the ribbon
posted

Hello there,

I already browsed the forum and played around with the .xaml files from the install dir.

However I still haven't figured out how I can restyle the ribbon. (changing colors etc. nothing too fancy and nothing violating the MS styleguide)

Could someone please provide me with a sample how to do this?

currently I have the images in my project, under /Images/ (however they appear to be broken)

I added the RibbonOffice2k7Silver.xaml to a ResourceDictionary in my main form, but the RibbonOffice2k7Silver.xaml doesn't compile. I tried fixing the errors but gave up after half an hour or so and finaly gave up.

Kind regards

  • 22852
    Offline posted

    Hello,

    Most likely the compile errors that you got were either due to missing resource dicionaries that RibbonOffice2k7Silver.xaml relies on or there isn't a reference to PresentationFramework.Luna in your project.

    You can use the following steps to use the RibbonOffice2k7Silver.xaml resource dictionary:

    1. Add a folder to your project in visual studio for the resources
    2. Add the following existing items to that folder:
      RibbonGeneric.xaml
      RibbonOffice2k7Brushes__Shared.xaml
      RibbonOffice2k7Brushes_Blue.xaml
      RibbonOffice2k7Brushes_Silver.xaml
      RibbonOffice2k7Silver.xaml
    3. Add a reference to PresentationFramework.Luna to your project
    4. Use the resource dictionary in your application:
       <ResourceDictionary Source="Resources\RibbonOffice2k7Silver.xaml"/>

    If you are looking to use a theme as is, you may want to review the How Theming Works section of the help.

    Let me know if you have any questions with this matter.

    Alan