Write your code that will run before a Save or Save As operation here. e.IsCancelled = e.PerformSaveOperation(); Write your ...