1234567891011121314151617181920212223242526 |
- using System;
- using System.Globalization;
- using Xamarin.Forms;
- namespace InABox.Mobile
- {
- public class GuidToBooleanConverter : IValueConverter
- {
- public bool EmptyValue { get; set; }
-
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return (value != null) && ((Guid)value != Guid.Empty)
- ? !EmptyValue
- : EmptyValue;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- }
|