* Use AppService for Commnunication instead of WebSocket * Code cleanup * Some polishing * Added some tests
27 lines
748 B
C#
27 lines
748 B
C#
using System;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Data;
|
|
|
|
namespace FluentTerminal.App.Converters
|
|
{
|
|
public class TrueToVisibleConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is Boolean visible)
|
|
{
|
|
return visible ? Visibility.Visible : Visibility.Collapsed;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is Visibility visibility)
|
|
{
|
|
return visibility == Visibility.Visible;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
} |