[Settings] Custom color format UI tweaks (#22790)

* Custom color format tweaks

* Delete vs. remove

* Update expect.txt

* [ColorPicker]Support BGR and RGB decimal value formats (#22771)

* ColorPicker add both decimal value formats

* ColorPicker, custom format dialog, resizing columns

* Custom color format tweaks

* Delete vs. remove

* Update expect.txt

* Fix rebase

* Fix error
This commit is contained in:
Niels Laute
2022-12-16 11:15:55 +01:00
committed by GitHub
parent b17955c968
commit b775d0710f
9 changed files with 382 additions and 305 deletions

View File

@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.UI.Xaml.Data;
namespace Microsoft.PowerToys.Settings.UI.Converters
{
public sealed class ColorFormatConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value != null)
{
return ColorFormatHelper.GetStringRepresentation(null, (string)value);
}
else
{
return string.Empty;
}
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
return value;
}
}
}