creating staticresource style programmatically using c# at runtime in wp7


  • Friends help me i want to create and edit styles dynamically at runtime very urgent please this code i am creating a style for button and assigning it. i want this code to create pragmatically using c# and assigning it . i have deleted the code because of character limit....

    <ResourceDictionary xmlns="" xmlns:x="" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"> <Style x:Key="btn" TargetType="Button"> <Setter Property="Background" Value="#FF1F3B53"/> <Setter Property="BorderBrush">

    </Setter> </Style> </ResourceDictionary>

    Monday, December 24, 2012 11:06 AM

All replies

  • You should understand that it is called "StaticResource" because it is accessible during "compile time".
    Monday, December 24, 2012 3:51 PM
  • thank you ....

    is there any other way to do the styles in compile time using c#....

    want to do for button ....for override the dark light theme

    Tuesday, December 25, 2012 10:46 AM