how do i do something like this
From @K Mehta (https://stackoverflow.com/a/21951103/1963978), with slight updates for the method signature for Windows 10 Universal applications (Changing from "CultureInfo culture" to "string language", per https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh701934.aspx) :
public class BooleanToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType,
object parameter, string language)
{
bool boolValue = (bool)value;
boolValue = (parameter != null) ? !boolValue : boolValue;
return boolValue ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType,
object parameter, string language)
{
throw new NotImplementedException();
}
}