private static void RecordAppData(string fileName, string content)
		{
			try
			{
				FolderService.AssureFolderAppData();

				var filePathAppData = Path.Combine(FolderService.FolderAppDataPath, fileName);

				UpdateText(filePathAppData, content);
			}
			catch (Exception ex)
			{
				Trace.WriteLine($"Failed to record log to AppData.\r\n{ex}");
			}
		}
        private static void Save <T>(T instance) where T : class
        {
            try
            {
                FolderService.AssureFolderAppData();

                using (var fs = new FileStream(_settingsFilePath, FileMode.Create, FileAccess.Write))
                {
                    var serializer = new XmlSerializer(typeof(T));
                    serializer.Serialize(fs, instance);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Failed to save settings.", ex);
            }
        }
        private static void Save <T>(T placement)
        {
            try
            {
                FolderService.AssureFolderAppData();

                using (var sw = new StreamWriter(_placementFilePath, false, Encoding.UTF8))                 // BOM will be emitted.
                    using (var xw = XmlWriter.Create(sw, new XmlWriterSettings {
                        Indent = true
                    }))
                    {
                        var serializer = new DataContractSerializer(typeof(T));
                        serializer.WriteObject(xw, placement);
                        xw.Flush();
                    }
            }
            catch (Exception ex)
            {
                Debug.WriteLine($"Failed to save window placement.\r\n{ex}");
            }
        }