locked
Change the key values of Resource Dictionary on code behind. RRS feed

  • Question

  • Hi

    Is it possible to change the values of the key from Resource Dictionary on code behind?

    I have this resource dictionary and all my silverlight form background is using this key.

    (example   <Grid x:Name="LayoutRoot" Background="{StaticResource FormBackgroundColor}"> )

    <ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  >
        <SolidColorBrush x:Key="MainBackgroundColor" Color="White"/>
        <SolidColorBrush x:Key="FormBackgroundColor" Color="White"/>
    </ResourceDictionary>


    I want to change the color of "FormBackgroundColor" dynamically on the code behind and all the forms must change automatically.

    Please help me

    Thanks

    Mark


    • Edited by Markdev84 Tuesday, January 15, 2013 4:24 AM
    Monday, January 14, 2013 7:02 AM

Answers

All replies