![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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) |
| Guest | 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) |
| Newbie Rep Power: 13 ![]() | 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 |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reference material for creating Resource Dictionary DLL | Bruce Parker | Avalon | 1 | 06-01-2007 07:41 AM |
| Best way to reference ConfigurationManager.AppSettings in XAML | Keith Patrick | Avalon | 0 | 12-19-2006 02:19 PM |
| How to reference another element in the same XAML file? | TyraelTong | Avalon | 2 | 09-27-2006 08:20 AM |
| XAML Assembly References | Joseph Bittman MVP MCSD | Avalon | 4 | 02-26-2006 02:23 PM |
| Reference a xaml window from a WinFX Custom Control Library ? | Peter Fitzgibbons | Avalon | 3 | 02-24-2006 04:11 PM |