Save you settings

There is a very smart solution Using settings in WPF

But this solution is good only for very simple samples. That's why I use old simple Settings property.


//Load window corner values. Centered if opened first.
if (Settings.Default.MainLeft == -1 || Settings.Default.MainTop == -1)
    this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
else
{
    this.WindowStartupLocation = WindowStartupLocation.Manual;
    this.Left = Settings.Default.MainLeft;
    this.Top = Settings.Default.MainTop;
}

Last edited Sep 11, 2010 at 9:24 AM by Denis_Yakimenko, version 7

Comments

No comments yet.