Click here to Skip to main content
13,449,155 members (49,630 online)
Click here to Skip to main content


37 bookmarked
Posted 9 Jun 2007

WPF Control State Persistency

, 9 Jun 2007
This article describes how to store and restore WPF's elements state, such as position, size, etc.
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Tomers.WPF.State.Demo.Data
	class Consultants : ObservableCollection<Consultant>
		public Consultants()
			Add(new Consultant("Tomer", "Shamam", ""));
			Add(new Consultant("Alon", "Flies", ""));
			Add(new Consultant("Emanuel", "Cohen-Yashar", ""));
			Add(new Consultant("Noam", "King", ""));

	class Consultant
		private string _firstName;
		public string FirstName
			get { return _firstName; }

		private string _lastName;
		public string LastName
			get { return _lastName; }

		private string _blog;
		public string Blog
			get { return _blog; }

		public Consultant(string firstName, string lastName, string blog)
			this._firstName = firstName;
			this._lastName = lastName;
			this._blog = blog;

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Tomer Shamam
Architect CodeValue
Israel Israel
Tomer Shamam is a Software Architect and a UI Expert at CodeValue, the home of software experts, based in Israel ( Tomer is a speaker in Microsoft conferences and user groups, and in-house courses. Tomer has years of experience in software development, he holds a B.A degree in computer science, and his writings appear regularly in the Israeli MSDN Pulse, and other popular developer web sites such as CodePlex and The Code Project. About his thoughts and ideas you can read in his blog (

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04-2016 | 2.8.180318.3 | Last Updated 10 Jun 2007
Article Copyright 2007 by Tomer Shamam
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid