WPF реализация

This commit is contained in:
Roman Pytkov
2026-06-04 22:02:15 +03:00
parent 85e9092d14
commit f9da101c4a
17 changed files with 521 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Sms.TaskTwo.Wpf.Converters;
public sealed class StringNotEmptyToVisibilityConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) =>
value is string text && !string.IsNullOrEmpty(text)
? Visibility.Visible
: Visibility.Collapsed;
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) =>
throw new NotSupportedException();
}