
We've had a few others ask questions about how to accomplish this, so wanted to clarify the steps needed to properly theme the scrollbars in the PropertyGrid (or any control that uses ScrollViewer).
1. Reference Ribbon Assembly
The Ribbon assembly must be referenced, since it includes Styles for ScrollViewer and ScrollBar. So make sure you reference the Ribbon assembly in your project.
2. Set Desired Theme
The theme should typically be set at the application level, like so:
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application {
public App() {
ActiproSoftware.Windows.Themes.ThemeManager.CurrentTheme = ActiproSoftware.Windows.Themes.CommonThemeName.Office2007Blue.ToString();
}
}
You can set the theme for specfic controls as well (instead of globally), but the implicit Style created in #3 would need to be duplicated in the Resources for the control in question.
3. Create Implicit Style for ScrollViewer
An implicit Style must be created so the Ribbon ScrollViewer Styles will be applied, like so:
<Application ...
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon">
<Application.Resources>
<Style x:Key="{x:Type ScrollViewer}" TargetType="ScrollViewer"
BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ScrollViewerAlternateKey}}" />
</Application.Resources>
</Application>
This will apply the themed ScrollViewer Style to all the ScrollViewers in your application. Alternatively, you could define this Style on a specific Window or Control.