【发布时间】:2012-12-13 06:53:36
【问题描述】:
我正在使用一个 Xaml 文件,该文件是从 ViewBase 派生的自定义视图,并且我想访问不同程序集中的 DynamicResource。我已经看到可以使用类似的东西:
<Application.Resources>
<ResourceDictionary
Source="/mylib;Resources/MyStyleDictionary.xaml" />
</Application.Resources>
但是我正在处理一个看起来像这样的 xaml 文件:
<myLib:ViewBase>
<Grid>
<Button>
Style="{DynamicResource MyButtonStyle}" // I want this style to come from a different assembly
</Button>
</Grid>
</myLib:ViewBase>
我该怎么做?
【问题讨论】:
标签: wpf xaml resources .net-assembly dynamicresource