Posted 14 years ago
by Mick
Version: 11.1.0542
Platform: .NET 4.0
Environment: Windows Vista (32-bit)

When using a dictionary of brushes (for example, RibbonCommonDictionary and DockingCommonDictionary):
1) Include all Actipro libraries in your sample project. (ActiproSoftware.DataGrid.Contrib.Wpf351.dll seems to be the offending one though):
2) XAML:3) Code behind:
4) Start the project: I get an error about the ResourceDictionary.DeferrableContent throwing an exception.
Note: If you run the same code without a reference to the DataGrid library, everything works fine (and any brushes that you reference will be used correctly).
---
Is there a way to
A) use a brush dictionary
and
B) switch themes dynamically
while including the DataGrid project on version 11.1.542?
Thank you
1) Include all Actipro libraries in your sample project. (ActiproSoftware.DataGrid.Contrib.Wpf351.dll seems to be the offending one though):
2) XAML:
<Window
x:Class="Themes.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
>
<Window.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.ApplicationButtonForegroundNormalBrushKey}}" />
</Style>
</ResourceDictionary>
</Window.Resources>
</Window>
using System;
using System.Windows;
using ActiproSoftware.Windows.Themes;
namespace Themes
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Loaded += MainWindow_Loaded;
}
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
ThemeManager.CurrentTheme = CommonThemeName.Office2010Black.ToString();
}
}
}
Note: If you run the same code without a reference to the DataGrid library, everything works fine (and any brushes that you reference will be used correctly).
---
Is there a way to
A) use a brush dictionary
and
B) switch themes dynamically
while including the DataGrid project on version 11.1.542?
Thank you