ResourceDictionary

Posted by  Amresh Kushwaha
WPF 
WPF
 9050  View(s)
Ratings:
Rate this:
How to use ResourceDictionary of WPF,,When we use simple windows form and add only usercontrols of wpf
  1. Re: ResourceDictionary

    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 Mar-29-2018 04:24:40 AM
  1.   Modified On Mar-29-2018 04:24:21 AM

Answer