protected virtual void OnClosed(RoutedEventArgs e) { UpdateVisualStates(true); var handler = Closed; if (null != handler) { handler(this, e); } }