private void chkHistory_Checked(object sender, RoutedEventArgs e) { try { chkHistory.IsEnabled = false; prmHistory = new PromoHistory(); pnlPromoVouchContent.Child = prmHistory; prmHistory.Margin = new Thickness(0); } catch (Exception ex) { ExceptionManager.Publish(ex); } finally { chkHistory.IsEnabled = true; } }