27 lines
757 B
C#
27 lines
757 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
using ChatController.ChatKlassen;
|
|
|
|
namespace ChatController.Converter
|
|
{
|
|
public class ChatBoxInfoVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if(value is Contact contact)
|
|
{
|
|
return contact.IsChatMessageInputGridVisible ? Visibility.Collapsed : Visibility.Visible;
|
|
}
|
|
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|