[IronPython] StaticResources + DLR + Silverlight

Dan Eloff dan.eloff at gmail.com
Mon May 5 15:43:53 CEST 2008

I notice if you use C#/VB, you have <Application> in your main xaml
file. In there you can place resources that can be used from anywhere
in your other xaml files. Using the {StaticResource foo}  markup

If you are using a dynamic language, there is no <DynamicApplication>
equivalent (please correct me if I'm wrong), most examples I've seen
use <UserControl>.

The trouble is placing your resources in <UserControl.Resources> makes
them off limit to {StaticResource foo} in any other xaml files (again
please correct me if I'm wrong)

So I find myself in a nightmare of duplicating resources across files
and setting styles in code from
Application.Current.RootVisual.Resources['foo'], neither of which is
pleasant. Are there really no better alternatives?


More information about the Ironpython-users mailing list