すべてのウィンドウを画面の中央に開くように設定しようとしています。ウィンドウスタートアップリソースディクショナリの場所
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Styles/Mystyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
だから私はちょうどリソースディクショナリに、このプロパティを挿入:
<Style x:Key="windowStyle" TargetType="Window">
<Setter Property="WindowStartupLocation" Value="CenterScreen"/>
</Style>
しかし、それは動作しません すべての私の窓は、スタイルファイルを使用します。何か不足していますか?
'WindowStartupLocation'はCLRプロパティで、スタイルセッターでは依存プロパティーのみを指定できます。私の[回答](http://stackoverflow.com/questions/10596515/setting-windowstartuplocation-from-resourcedictionary-throws-xamlparseexception/21178555#21178555)を参照してください。 –