Hi friends
In My WPF application I allocate the Default Theme (say BlueTheme.xaml)
Here is code that i write in Application_startUp Methods.
string packUri = @"/Customize Themes;component/Resources/BlueTheme.xaml";
Uri url = new Uri(packUri, UriKind.Relative);
ResourceDictionary rd = Application.LoadComponent(url) as ResourceDictionary;
Application.Current.Resources = rd;
so when project is compile the BlueTheme.xaml is allocated to WPF window as Resource.
So Blue Theme is Apply to the WPF controls.
Now I create a Color Picker and change the color of different Property of WPF controls
that will update on the BlueTheme.XAML file
So when I select new color of (say Button Background color) then the BlueTheme.xaml file will update the new color
and that will reflect On the current Window Automatically....
Means that I have .xaml file that allready allocate to the WPF window As Resource
But at the Runtime I Update or Overwrite the .xaml file
after Whterver change I done in .Xaml file that will reflect the Current WPF window. How ?
So what so I do for that .....?
Plaese help me ....
Is it Possible ?
Give Good Link or Blog..
Here My BlueTheme.xaml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Button}" >
<Setter Property="Background" Value="#C3C3EE"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="Foreground" Value="Black"/>
</Style>
</ResourceDictionary >
Advance Thanks
Have Nice Time