1

On Windows Forms, you have the StartPosition property which allows you to specify the position on the screen your form will be placed when it launches.

Does WPF have an equivalent and if so what is it?

Thanks

JMK
  • 27,273
  • 52
  • 163
  • 280

1 Answers1

4

I think you are looking for WindowsStartupLocation:

Setting WindowStartupLocation to Manual causes a window to be positioned according to its Left and Top property values. If either the Left or Top properties aren't specified, their values are determined by Windows.

<Window x:Class="WpfAppl.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="WindowName" 
    Height="500" Width="500"
    WindowStartupLocation="Manual" 
    Left="0" Top="0">
</Window>
Rahul
  • 5,603
  • 6
  • 34
  • 57
Mahmoud Gamal
  • 78,257
  • 17
  • 139
  • 164