Control
XAML のルート要素のスタイルをStaticResource
external で定義されたものに設定しようとしてResourceDictionary
いますが、次のエラーが表示されます。
The resource "MyControlStyle" could not be resolved.
<UserControl
...
>
<UserControl.Resources>
<ResourceDictionary Source="..\Styles\MyStyles.xaml" />
</UserControl.Resources>
<UserControl.Style>
<StaticResource ResourceKey="MyControlStyle"/>
</UserControl.Style>
</UserControl>
コントロールを利用する XAML ファイルでスタイルを設定する以外に、これをどのように実現できますか? UserControl
のデザイナーでスタイルの効果を確認できるように、 内からスタイルを設定できるようにしたいと考えていUserControl
ます。