none
creating staticresource style programmatically using c# at runtime in wp7

    Question

  • Friends help me i want to create and edit styles dynamically at runtime very urgent please help.in 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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 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