public BookingViewModel(BookingViews type, ModelBase model, bool IsDuplicate) { _model = model; // TODO: Remove "() => false" when tab will be completed. SwitchToTeeBookingCommand = new RelayCommand(SwitchToTeeBookingCommandExecuted, () => false); SwitchToGroupBookingCommand = new RelayCommand(SwitchToGroupBookingCommandExecuted, () => false); SwitchToEventBookingCommand = new RelayCommand(SwitchToEventBookingCommandExecuted); SwitchToCompetitionBookingCommand = new RelayCommand(SwitchToCompetitionBookingCommandExecuted, () => false); SwitchToMatchBookingCommand = new RelayCommand(SwitchToMatchBookingCommandExecuted, () => false); if (IsDuplicate) { Content = new EventBookingView(_model as EventModel, IsDuplicate); } else { SwitchBookingView(type); } }
private void SwitchToEventBookingCommandExecuted() { Content = new EventBookingView(_model as EventModel); }