I'm trying to set all my windows to open in the center of the screen. All my windows use style file:
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Styles/Mystyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
So I just inserted this property to the resource dictionary:
<Style x:Key="windowStyle" TargetType="Window">
<Setter Property="WindowStartupLocation" Value="CenterScreen"/>
</Style>
But, it doesn't work. Am I missing something?