[ImageResizer]Improve UI (#31357)

* update to v3

* SizeToContent="Height"

* unimportant code-behind

* UI and text

* finishing touch

* Update NOTICE.md

* Update Resources.resx

W to E

* Fix spellcheck
This commit is contained in:
Jay
2024-02-15 19:36:36 +01:00
committed by GitHub
parent 319a0dd6c2
commit 3e58382637
14 changed files with 105 additions and 209 deletions

View File

@@ -1,13 +1,13 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
// See the LICENSE file in the project root for more information.
// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
using System.Windows.Controls;
using System.Windows.Input;
using ImageResizer.ViewModels;
using Wpf.Ui.Controls;
using static ImageResizer.ViewModels.InputViewModel;
using Numberbox = Wpf.Ui.Controls.NumberBox;
namespace ImageResizer.Views
{
@@ -29,10 +29,9 @@ namespace ImageResizer.Views
if (e.Key == Key.Enter)
{
var numberBox = sender as NumberBox;
var viewModel = (InputViewModel)this.DataContext;
double number;
var viewModel = (InputViewModel)DataContext;
KeyPressParams keyParams;
if (double.TryParse(((System.Windows.Controls.TextBox)e.OriginalSource).Text, out number))
if (double.TryParse(((System.Windows.Controls.TextBox)e.OriginalSource).Text, out double number))
{
// Determine which NumberBox triggered the event based on its name
switch (numberBox.Name)