и свойство Binding никогда не вызывается
Код: Выделить всё
public class BoolToObjectConverter : IValueConverter
{
public T TrueObject { set; get; }
public T FalseObject { set; get; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? TrueObject : FalseObject;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return ((T)value).Equals(TrueObject);
}
}
Код: Выделить всё
Код: Выделить всё
public bool DeviceHasScanner
{
get
{
return Settings.Get.DeviceHasScanner; //This code return true or false
}
}

Подробнее здесь: https://stackoverflow.com/questions/736 ... tconverter
Мобильная версия