Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows XAML C#4.0 resource , +
How I can select some different resource dictionary during execution time .
 
ie button1 click Resource dictionary1 will come into picture similarly
button2 click Resource dictionary2 will come into picture
 
Thanks in advance
 
iqbal
Posted 27-Jan-12 8:21am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here's your solution. Please not you will obviously have to adapt it to your own project by way of click events on your buttons. But this is the the way to go about achieving what you wanted.
 
http://weblogs.asp.net/psheriff/archive/2009/12/01/load-resource-dictionaries-at-runtime-in-wpf.aspx[^]
  Permalink  
Comments
MohammadIqbal at 31-Jan-12 8:41am
   
I tried earlier with this but what are the namespace required to make the code run: File.Exists(fileName) shows an error
Dean Oliver at 31-Jan-12 10:30am
   
System.IO if you have a problem resolving namespaces just hover over the class and press ctrl and dot at the same time to resolve a class to a namespace. ctrl
+ .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 31 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100