Further to what Atheist posted, you can create the setting and the binding from the (ApplicationSettings) node in the properties window for the TextBox. Once that's done the data will be loaded and saved automatically at startup and shutdown.