1
我每次啓動Windows應用程序new Application().Run(new MainWindow())
我的WPF應用程序 - 所以我沒有一個的App.xaml如何在UserControl中從外部窗口繼承資源?
我有一個主窗口,其中包含每ContentControl中
<Window ..>
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..." />
<!-- ... -->
<converter:BooleanToIntConverter x:Key="BooleanToIntConverter" />
</ResourceDictionary>
</Window.Resources>
<ContentControl Grid.Column="0" Content="{Binding MyUserControl}" />
</Window>
如何使用任何用戶控件我可以從MainWindow繼承資源到MainControlow中的UserControls嗎?