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.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.