Themes Office2010Silver suspected key deprecated

WPF Studio, Themes, and Shared Library for WPF Forum

The latest build of this product (v22.1.4) was released 2 months ago, which was before this thread was created.
Posted 19 days ago by Mario
Version: 22.1.4
Platform: .NET 4.8
Environment: Windows 10 (64-bit)
Avatar

Hello everyone.
I am using Window 10 operating system with Visual Studio 2019 installed and The ActiPro version 22.1.4.0 On a Wpf project .

I am using the Office2010Silver theme in this way as per the documentation

-----------------------------> File App.xaml
ThemeManager.BeginUpdate();
try
{
// The Office themes are in a separate assembly and must be registered if you will use them in the application
ThemesAeroThemeCatalogRegistrar.Register();

// Use the Actipro styles for native WPF controls that look great with Actipro's control products
ThemeManager.AreNativeThemesEnabled = true;

ThemeManager.RegisterThemeCatalog("Custom", new CustomDockingThemeCatalog());

ThemeManager.CurrentTheme = ThemeNames.Office2010Silver;
//ThemeManager.CurrentTheme = ThemeNames.Office2010Blue;

}
finally
{
ThemeManager.EndUpdate();
}
base.OnStartup(e);

----------------------------File CustomDockingThemeCatalog.cs
public override IEnumerable<ThemedResourceDictionaryReference> DictionaryReferences
{
get
{
if (dictionaryReferences == null)
{
string baseUri = ResourceHelper.GetLocationUriStringBase(Assembly.GetExecutingAssembly()) + "UI/Skin/Themes/";

dictionaryReferences = new ThemedResourceDictionaryReference[] {
new ThemedResourceDictionaryReference() {
LocationUri = new Uri(baseUri + "Office2010Silver.xaml", UriKind.RelativeOrAbsolute),
Themes = new string[] {
ThemeNames.Office2010Silver.ToString(),
},
}

};
}
return dictionaryReferences;
}
}

------>file Office2010Silver.xaml

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:controlsPrimitives="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:media="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
>

<controlsPrimitives:ElementChromeBorderStyle x:Key="{x:Static themes:AssetResourceKeys.StandardMdiElementChromeBorderStyleKey}">None</controlsPrimitives:ElementChromeBorderStyle>
<CornerRadius x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarBorderNormalCornerRadiusKey}">0</CornerRadius>
<LinearGradientBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarBackgroundActiveBrushKey}" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#FFFFFCF2" Offset="0.05" />
<GradientStop Color="#FFFFF4D1" Offset="0.5" />
<GradientStop Color="#FFFFE8A6" Offset="0.51" />
<GradientStop Color="#FFFFE8A6" Offset="0.95" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarBackgroundInactiveBrushKey}"
StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="#FFFEFEFE" Offset="0.5" />
<GradientStop Color="#FFE5E9EE" Offset="1" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarForegroundActiveBrushKey}"
Color="#FF3B3B3B" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarForegroundInactiveBrushKey}"
Color="#FF4C535C" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarGlyphBackgroundActiveBrushKey}"
Color="#FF3B3B3B" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerTitleBarGlyphBackgroundInactiveBrushKey}"
Color="#FF4C535C" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.RaftingWindowBorderNormalBrushKey}"
Color="#FF939AA3" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.TabbedMdiContainerTabItemBorderHoverBrushKey}" Color="#FF939AA3" />
<SolidColorBrush PresentationOptions:Freeze="True" x:Key="{x:Static themes:AssetResourceKeys.TabbedMdiContainerTabItemGlyphBackgroundSelectedBrushKey}" Color="#FF000000" />

and these keys do not work .I suspect that they are deprecated .

Can you give me alternative support for the features that have been deprecated ?

Comments (3)

Posted 19 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes in v20.1, we made updates to the resources used by Themes.  We kept a thorough list of all of them in this documentation topic

For instance, you can see in that topic entries like:

  • DockingWindowContainer*BrushKey properties renamed to ToolWindowContainer*BrushKey for clarity. Use the new TabbedMdiContainerBackgroundNormalBrushKey property in place of DockingWindowContainerBackgroundNormalBrushKey for tabbed MDI containers only.

Please refer to that list to see the changes that were made and it should provide the info you need.


Actipro Software Support

Posted 18 days ago by Mario
Avatar


Thank you for all the guidance . I looked at the documentation and I didn't find anything about these two styles / brushes

StandardMdiElementChromeBorderStyleKey
TabbedMdiContainerTabItemBorderHoverBrushKey

can you give me some more info
Thank you in advance for everything

Posted 18 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Sure, I hope this helps:

  • *ChromeBorderStyleKey assets were removed since Classic themes are no longer supported.
  • TabbedMdiContainerTabItemBorderHoverBrushKey is still used, so no changes to that.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.