From 7b4ec0dc8ba79c900d5b8e3f298c69cf2e82f6e6 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sat, 12 Aug 2023 01:16:40 -0400 Subject: [PATCH] Formatting --- StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs index c801be54..2e2e485f 100644 --- a/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs @@ -418,14 +418,16 @@ public partial class SettingsViewModel : PageViewModelBase var grid = ImageProcessor.CreateImageGrid(images.ToImmutableArray()); // Show preview - var image = new Image(); using var peekPixels = grid.PeekPixels(); using var data = peekPixels.Encode(SKEncodedImageFormat.Jpeg, 100); await using var stream = data.AsStream(); - image.Source = WriteableBitmap.Decode(stream); - + var image = new Image + { + Source = WriteableBitmap.Decode(stream) + }; + var dialog = new BetterContentDialog { Content = image,