feat: add map drawing
This commit is contained in:
26
Client/Application/Services/NullToVisibilityConverter.cs
Normal file
26
Client/Application/Services/NullToVisibilityConverter.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Client.Application.Services
|
||||
{
|
||||
public class NullToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var isCollapsedWhenNull = parameter == null ? false : true;
|
||||
var nullVisibility = isCollapsedWhenNull ? Visibility.Collapsed : Visibility.Hidden;
|
||||
return value == null ? nullVisibility : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user