Switch focus to last Image Size ListViewItem on adding new size (#7505)

This commit is contained in:
Arjun Balgovind
2020-10-26 11:06:35 -07:00
committed by GitHub
parent 129342edff
commit ec22bc40bc
3 changed files with 21 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private bool _keepDateModified;
private int _encoderGuidId;
public bool IsListViewFocusRequested { get; set; }
public bool IsEnabled
{
get
@@ -257,6 +259,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
imageSizes.Add(newSize);
_advancedSizes = imageSizes;
SavesImageSizes(imageSizes);
// Set the focus requested flag to indicate that an add operation has occurred during the ContainerContentChanging event
IsListViewFocusRequested = true;
}
public void DeleteImageSize(int id)