private void CompletedStampToggleButton_Click(object sender, RoutedEventArgs e) { UpdateUIAutomation(); if (TaskItem.IsCompleted == true) { Haptics.ApplyCompletedStampHaptics(); SoundFX.PlayCompletedSound(); } else { Haptics.ApplyEraseCompletedStampHaptics(); } if (TaskItem != null) { ToDoTask.AcknowledgeIsCompletedStateChange(this.TaskItem.IsCompleted); } else { Debug.WriteLine("Crash Prevented! - Value of TaskItem was null"); } }