Beispiel #1
0
        /// <summary>
        /// Save inking preference to file.
        /// </summary>
        /// <returns></returns>
        public async Task SaveAsync()
        {
            AppEventSource.Log.Debug("ViewerPage: Saving drawing preference...");
            try
            {
                StorageFile file = await
                                   ApplicationData.Current.LocalFolder.CreateFileAsync(INKING_PREFERENCE_FILENAME, CreationCollisionOption.ReplaceExisting);

                await SuspensionManager.SerializeToFileAsync(this, typeof(InkingPreference), file);
            }
            catch (Exception ex)
            {
                App.NotifyUser(typeof(ViewerPage), "An Error occurred when saving inking preference.\n" + ex.Message);
            }
        }