Home > DeveloperSection > Forums > ResourceDictionary
Amresh Kushwaha

Total Post:38

Posted on    August-16-2011 10:45 AM


 2 Reply(s)
 8225  View(s)
Rate this:
How to use ResourceDictionary of WPF,,When we use simple windows form and add only usercontrols of wpf

John Smith

Total Post:102

Posted on    August-16-2011 12:46 PM

Right Click the project in the Resource folder:
Add->Existing item->Select the Resource file

You can use following line of code to include resource file.

< Window.Resources >
        < ResourceDictionary >
            < ResourceDictionary.MergedDictionaries >
                < ResourceDictionary Source="sample.xaml" / >
            < /ResourceDictionary.MergedDictionaries >
        < /ResourceDictionary >
</Window.Resources >

By using key value we can access resource.
Use this function
this.FindResource("Key value")

Modified On Aug-16-2011 12:48:22 PM

Chris S
Chris S

Total Post:48

Posted on    August-16-2011 12:51 PM

Modified On Mar-15-2016 07:27:29 AM

Don't want to miss updates? Please click the below button!

Follow MindStick