I linked xaml files in vs2010 solution for resuabiltiy like this:
And I tried to load that by resource dictionary tag in App.xaml like this开发者_开发问答:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Myproject;component/CommonStyles/Button.xaml" />
...
</ResourceDictionary>
But it can't loading in project.
How can I load these xaml files?
edited:
I tried that.
But compiler still can't find out xaml files.
So I trans a build working time from 'Page' to 'Resource'.
and then, a lot of compile error occured.
In case these xaml files resides in different assembly, you need to import them using pack syntax like this -
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Myproject;component/CommonStyles/Button.xaml" />
......
</ResourceDictionary.MergedDictionaries>
精彩评论