1234567891011121314151617181920212223242526 |
- using System;
- using System.Globalization;
- using InABox.Core;
- using Xamarin.Forms;
- namespace InABox.Mobile
- {
- public class DateTimeToBooleanConverter : BindableObject, IValueConverter
- {
- public bool EmptyResult { get; set; }
-
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is DateTime date)
- return date.IsEmpty() == EmptyResult;
- return false;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- }
|