Referencing Resources
-
I want to reuse some styles, so I created a resources file in the root of my project called AppResources.xaml. I then copied the styles into it. At the top of my view, I replaced the styles with
Yet I get a compile error "An error occured while finding the resource dictionary 'pack://application:,,,/Common;component/AppResources.xaml'". What's the right way to do this? [UPDATE] Fixed it with
If it's not broken, fix it until it is
-
I want to reuse some styles, so I created a resources file in the root of my project called AppResources.xaml. I then copied the styles into it. At the top of my view, I replaced the styles with
Yet I get a compile error "An error occured while finding the resource dictionary 'pack://application:,,,/Common;component/AppResources.xaml'". What's the right way to do this? [UPDATE] Fixed it with
If it's not broken, fix it until it is
If you want to access a resource which is in different assembly, then use the pack URI as follows... Pack://application:,,,/SampleAssembly;component/SampleFolder1/SampleImage.jpg If you want to merge two resource dictionaries use the following code suppose if Dictionary1 and Dictionary2 are your resource xaml files, then to merge these resources