private void LoadCabDetails() { ClientLogic clientLogic = this.DataContext as ClientLogic; Debug.Assert(clientLogic != null); DisplayCab selectedCab = listViewCabs.SelectedItem as DisplayCab; if (selectedCab != null) { clientLogic.CurrentCab = selectedCab; clientLogic.AdminGetResultFiles(); clientLogic.CurrentView = ClientLogicView.CabDetail; } }