Ready for Commands
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
<DataTemplate DataType="{x:Type vms:AddTournametViewModel}">
|
||||
<views:AddTournamentView/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vms:EditTournamentViewModel}">
|
||||
<views:EditTournamentView/>
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
|
||||
private string _tournamentname;
|
||||
public string Tounamentname
|
||||
public string Tournamentname
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace Apollon.WPF.ViewModels
|
||||
set
|
||||
{
|
||||
_tournamentname = value;
|
||||
OnPropertyChanged(nameof(Tounamentname));
|
||||
OnPropertyChanged(nameof(Tournamentname));
|
||||
OnPropertyChanged(nameof(CanSubmit));
|
||||
}
|
||||
}
|
||||
@@ -94,9 +94,9 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanSubmit => !string.IsNullOrEmpty(Tounamentname);
|
||||
public bool CanSubmit => !string.IsNullOrEmpty(Tournamentname);
|
||||
public ICommand SubmitCommand { get; }
|
||||
public ICommand CancleCommand { get; }
|
||||
public ICommand CancelCommand { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
17
Apollon.WPF/ViewModels/EditTournamentViewModel.cs
Normal file
17
Apollon.WPF/ViewModels/EditTournamentViewModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class EditTournamentViewModel : ViewModelBase
|
||||
{
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
public EditTournamentViewModel()
|
||||
{
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,9 +20,7 @@ namespace Apollon.WPF.ViewModels
|
||||
_modalNavigationStore = modalNavigationStore;
|
||||
OverviewViewModel = overviewViewModel;
|
||||
|
||||
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
||||
|
||||
//_modalNavigationStore.CurrentViewModel = new AddTournametViewModel();
|
||||
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
||||
}
|
||||
|
||||
protected override void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user