mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-12-14 16:16:24 +01:00
Many new plays
This commit is contained in:
46
WindowViewModel.cs
Normal file
46
WindowViewModel.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
public class WindowViewModel : BaseViewModel
|
||||
{
|
||||
public WindowViewModel()
|
||||
{
|
||||
ShowDialogCommand = new RelayCommand(async x => await ShowDialogAsync(x));
|
||||
}
|
||||
|
||||
private async Task ShowDialogAsync(object obj)
|
||||
{
|
||||
var dialog = new ContentDialogExample();
|
||||
await dialog.ShowAsync();
|
||||
}
|
||||
|
||||
public bool BooleanValue
|
||||
{
|
||||
get => GetProperty(true);
|
||||
set => SetProperty(value);
|
||||
}
|
||||
|
||||
public Visibility VisibilityEnumTest
|
||||
{
|
||||
get => GetProperty<Visibility>();
|
||||
set => SetProperty(value);
|
||||
}
|
||||
|
||||
public double SliderTest
|
||||
{
|
||||
get => GetProperty<double>(100);
|
||||
set => SetProperty(value);
|
||||
}
|
||||
|
||||
public double ValidationTest
|
||||
{
|
||||
get => GetProperty<double>();
|
||||
set => SetProperty(value);
|
||||
}
|
||||
|
||||
public ICommand ShowDialogCommand { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user