Changing the start up location of a WPF window in XAML to Bottom-Right

Viewed 6267

Is it possible to set the manual startup location for a WPF window in XAML to start in the Bottom-Right corner of the screen? I can do it in code-behind, but when the window opens, it pops up at the manual location (middle-left of the screen) then it jumps to the bottom right of the screen and it does not look very good.

I can set the location in the Top-Left of the corner in XAML with this coding:

<Window x:Class="WpfApplication1.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Window1" 
    Height="500" Width="500"
    WindowStartupLocation="Manual" 
    Left="0" Top="0">
</Window>

Can I do the same for the Bottom-Right corner of the screen with XAML coding to fit ANY screen size?

2 Answers
Related