mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
24 lines
816 B
C#
24 lines
816 B
C#
|
|
// 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 Microsoft.UI.Xaml.Data;
|
|||
|
|
using RS_ = Microsoft.CmdPal.UI.Helpers.ResourceLoaderInstance;
|
|||
|
|
|
|||
|
|
namespace Microsoft.CmdPal.UI;
|
|||
|
|
|
|||
|
|
public partial class PlaceholderTextConverter : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|||
|
|
{
|
|||
|
|
return value is string placeholder && !string.IsNullOrEmpty(placeholder)
|
|||
|
|
? placeholder
|
|||
|
|
: (object)RS_.GetString("DefaultSearchPlaceholderText");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|||
|
|
{
|
|||
|
|
throw new NotImplementedException();
|
|||
|
|
}
|
|||
|
|
}
|