From 51f3ee8a97ed22755ee1903e33acca2cc812bd73 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 17 Jun 2022 12:12:38 +0200 Subject: [PATCH] Update .NET Community Toolkit to Preview 4 --- .../ViewModels/MainViewModel.cs | 27 ++++++------------- .../ComputeSharp.SwapChain.Uwp.csproj | 2 +- .../ComputeSharp.SwapChain.WinUI.csproj | 2 +- src/ComputeSharp/ComputeSharp.csproj | 2 +- .../ComputeSharp.Tests.csproj | 2 +- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs index 1f0291b3..1381476b 100644 --- a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs @@ -20,7 +20,7 @@ namespace ComputeSharp.SwapChain.Core.ViewModels; /// /// The viewmodel for for a view that allows users to select shaders and customize settings. /// -public sealed class MainViewModel : ObservableObject +public sealed partial class MainViewModel : ObservableObject { /// /// The instance currently in use. @@ -40,9 +40,6 @@ public sealed class MainViewModel : ObservableObject this.selectedResolutionScale = 100; this.selectedComputeShader = ComputeShaderOptions[0]; this.selectedComputeShader.IsSelected = true; - - SetResolutionScaleCommand = new RelayCommand(SetResolutionScale); - ToggleRenderingPausedCommand = new RelayCommand(ToggleRenderingPaused); } /// @@ -101,19 +98,6 @@ public sealed class MainViewModel : ObservableObject } } - /// - /// Gets the command that sets . - /// - public IRelayCommand SetResolutionScaleCommand { get; } - - /// - /// Sets . - /// - private void SetResolutionScale(int resolutionScale) - { - SelectedResolutionScale = resolutionScale; - } - /// /// Gets the collection of available compute shader. /// @@ -171,13 +155,18 @@ public sealed class MainViewModel : ObservableObject } /// - /// Gets the command that toggles . + /// Sets . /// - public IRelayCommand ToggleRenderingPausedCommand { get; } + [RelayCommand] + private void SetResolutionScale(int resolutionScale) + { + SelectedResolutionScale = resolutionScale; + } /// /// Toggles . /// + [RelayCommand] private void ToggleRenderingPaused() { IsRenderingPaused = !IsRenderingPaused; diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index e683cd8f..1f8aa933 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -205,7 +205,7 @@ - 8.0.0-preview1 + 8.0.0-preview4 4.5.1 diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 36220337..a9f09581 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index ce8db878..2db2d034 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -16,7 +16,7 @@ - + diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index cc0194a8..665da7e6 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -8,7 +8,7 @@ - +