public void AfterSaveNewToGoOrder() { try { if (Panes.Any(a => (a.IsVisible && (a.Content is UI.CtrlToGoOrders)))) { var pane = Panes.FirstOrDefault(a => (a.IsVisible && (a.Content is UI.CtrlToGoOrders))); ((pane.Content as UI.CtrlToGoOrders).DataContext as ToGoOrdersViewModel).AfterAddOrder(); ShowPane(pane); } } catch { } }