mirror of
				https://github.com/holgerb83/ModernWpfPlayground.git
				synced 2025-11-04 09:31:48 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
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; }
 | 
						|
    }
 | 
						|
} |