Click here to Skip to main content
11,708,116 members (74,490 online)
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 7: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)

  Print Answers RSS
0 Maciej Los 230
1 Mika Wendelius 180
2 OriginalGriff 168
3 Sergey Alexandrovich Kryukov 145
4 Peter Leow 140
0 OriginalGriff 9,198
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,921
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 31 Jan 2012
Copyright © CodeProject, 1999-2015
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