mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user