protected override void OnShowWindow() { // Plays a system sound when the window is initialized (shown) TaskDialog td = Content as TaskDialog; if (td != null) { td.OnWindowInitialized(); switch (td.SystemSound) { case TaskDialogSound.Beep: SystemSounds.Beep.Play(); break; case TaskDialogSound.Exclamation: SystemSounds.Exclamation.Play(); break; case TaskDialogSound.Hand: SystemSounds.Hand.Play(); break; case TaskDialogSound.Question: SystemSounds.Question.Play(); break; case TaskDialogSound.Asterisk: SystemSounds.Asterisk.Play(); break; } } }