Setting color of AssetResourceKeys from code behind

Docking/MDI for WPF Forum

Posted 3 years ago by Harsh Chawla
Version: 17.1.0651


How do I set color of AssetResourceKeys from code behind.

I can set it in xaml like this <SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.DockingWindowContainerBackgroundNormalBrushKey}" Color="#E4F2FF" /> but need to set the same from code behind .

Comments (1)

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA


You can do that sort of thing like:

Application.Current.Resources[AssetResourceKeys.DockingWindowContainerBackgroundNormalBrushKey] = 
    new SolidColorBrush(Color.FromRgb(0xE4, 0xF2, 0xFF));

Actipro Software Support

The latest build of this product (v2019.1 build 0684) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.