Hello,
thank you for your work.
I have tried it and it works fine when running the program.
BUT:
It is no usable because all my xaml files do not work in the Visual Studio
Designer.
Means when I refer in xaml to an resource key for example myKey of a
resource
and the resource is definied in the external resource dictionay
you get an resourrce key not found error from the VS-Xaml-Designer.
The xaml-designer does not run the constructor of the window class, where
the add to
the resourcedictionary is coded.
Also the sample for control devolopers is very weak, because think you want
to make
for example 5 usercontrols - these controls are definied in xaml in a
myUserControl.DLL
How to use shared resources in this case?
It's a hard problem I think.
Thank you for any help.
Best Regards
Rolf Welskes
""Walter Wang [MSFT]""
news:2EZsKVmJIHA.540@TK2MSFTNGHUB02.phx.gbl...
> Hi Rolf,
>
> Please refer to following blog:
>
> #Windows Presentation Foundation SDK : Defining and Using Shared
> Resources
> in a Custom Control Library
> http://blogs.msdn.com/wpfsdk/archive/2007/06/08/defining-and-using-shared-re
> sources-in-a-custom-control-library.aspx
>
> I've tested first approach in the blog which is using a static property to
> return a resource singleton and add that resource to your control's
> Resources.MergedDictionaries before InitializeComponent(). Although the
> sample code in the blog uses two controls in the same project as the
> resource, if you make the static property public and accessible to other
> assemblies, they will be able to use the same resource too.
>
>
> Regards,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>