31 lines
944 B
C#
31 lines
944 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace ChatController.Converter
|
|
{
|
|
public class BroadcastCheckBoxVisibilityMultiConverter : IMultiValueConverter
|
|
{
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if(values.Length == 2 && values[0] is bool isInBroadcastMode && values[1] is bool isChatMessageInputGridVisible)
|
|
{
|
|
if(isInBroadcastMode)
|
|
{
|
|
return isChatMessageInputGridVisible ? Visibility.Visible : Visibility.Hidden;
|
|
}
|
|
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|