Ready for Commands

This commit is contained in:
Natlinux81
2022-08-14 03:05:01 +02:00
parent 311cd83b70
commit ab742103de
4 changed files with 25 additions and 7 deletions

View File

@@ -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">

View File

@@ -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; }
}

View 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();
}
}
}

View File

@@ -21,8 +21,6 @@ namespace Apollon.WPF.ViewModels
OverviewViewModel = overviewViewModel;
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
//_modalNavigationStore.CurrentViewModel = new AddTournametViewModel();
}
protected override void Dispose()