如何根据SL4中的应用程序资源定义直接资源?

时间:2011-08-27 13:28:09

标签: silverlight-4.0

我想知道是否有办法根据应用程序资源(在App.xaml中定义)定义直接资源(在用户控件或页面中定义)?

所以,如果我的App.xaml中有一个资源,如:

<my:ParentResource x:Key="AppResource" />

我可以根据应用程序资源的属性创建一个直接资源。类似的东西:

<UserControl.Resources>
    <local:ChildResource x:Key="LocalResource" />
</UserControl.Resources>

其中ChildResource实际上是在ParentResource类中创建/实例化/找到的属性,例如ParentResource.Child。

这可以在Silverlight 4中使用吗?

0 个答案:

没有答案
相关问题