public Convert ( object value, |
||
value | object | |
targetType | ||
parameter | object | |
language | string | |
return | object |
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value == null || !(value is bool))
return PortableVisibility.Collapsed;
var visible = (bool) value;
if (parameter != null && (bool) parameter)
{
visible = !(bool) value;
}
return visible ? PortableVisibility.Visible : PortableVisibility.Collapsed;
}