Setting color of AssetResourceKeys from code behind

Docking/MDI for WPF Forum

Posted 7 years ago by Harsh Chawla
Version: 17.1.0651
Avatar

Hi,

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 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

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 (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.