Click here to Skip to main content
12,699,022 members (25,927 online)
Click here to Skip to main content

Tagged as

Stats

105.9K views
3K downloads
61 bookmarked
Posted

Save and Restore WPF Window Size, Position, and/or State

, 3 Aug 2012 CPOL
A quick example of how you can save the window size, position, and/or state, and restore your form to that size, position, and state the next time the app is launched.
<Window x:Class="SaveWindowPosition.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" 
        Closing="Window_Closing"
        >
    <Grid>
        
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jeremy Hutchinson
Software Developer
United States United States
I develop applications using Angular, ASP.Net MVC and SQL hosted on AWS by day, and in my free time I develop apps for Windows Phone and Windows 10 as well as web apps hosted in Azure. I always try to blog about what I've learned.

I also help run the Casco Bay .Net User Group

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170118.1 | Last Updated 3 Aug 2012
Article Copyright 2010 by Jeremy Hutchinson
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid