mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
ImageResizer: skip Settings tab focus when hidden
This commit is contained in:
committed by
Andrey Nekrasov
parent
49811fc4b8
commit
ccf02579e6
21
src/modules/imageresizer/ui/Views/VisibilityBoolConverter.cs
Normal file
21
src/modules/imageresizer/ui/Views/VisibilityBoolConverter.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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/
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace ImageResizer.Views
|
||||
{
|
||||
[ValueConversion(typeof(Visibility), typeof(bool))]
|
||||
internal class VisibilityBoolConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> (Visibility)value == Visibility.Visible;
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> (bool)value ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user