![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Can you reference a XAML Resource from an External Assembly? I have an assemblt called ControlsEx. In its project is a XAML file that has some resources in a dictionary. How can I add those resources into an Application Resource Collection. How do you reference it in the Source property? <Application.Resources> <ResourceDictionary Source="r.xaml"></ResourceDictionary> </Application.Resources> Thanks. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Can you reference a XAML Resource from an External Assembly? Try this one. The source format is based on XPS, and the triple commas are being used as escape codes. <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/TheExternalResourceDll;component/TheFilePathInTheDll/MyExternalStyle.xaml"/> </ResourceDictionary.MergedDictionaries> <Style x:Key="YouCanStillDefineLocalResourcesHere"> </Style> </ResourceDictionary> </Application.Resources> |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Can you reference a XAML Resource from an External Assembly? Keith, Yes, that's exactly what I was looking for. You nailed it, thank you very much! |
My System Specs![]() |
| | #4 (permalink) |
| | I Patrick coud you tell me what is thefilepathinthedll ? i've tried "pack://application:,,,/FrameWork.UI.Controls;component/./ReusableStyle.xaml"/> the xaml file is in the FrameWork.UI.Controls assembly & namespace what's wrong ? Thanks Thierry Try this one. The source format is based on XPS, and the triple commas are being used as escape codes. <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/TheExternalResourceDll;component/TheFilePathInTheDll/MyExternalStyle.xaml"/> </ResourceDictionary.MergedDictionaries> <Style x:Key="YouCanStillDefineLocalResourcesHere"> </Style> </ResourceDictionary> </Application.Resources> |
My System Specs![]() |