Billing/Billing.Shared/UI/Converters.cs
2022-02-23 16:09:24 +08:00

24 lines
550 B
C#

using Billing.Languages;
using System;
using System.Globalization;
using Xamarin.Forms;
namespace Billing.UI;
public class TitleDateConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime date)
{
return date.ToString(Resource.TitleDateFormat);
}
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}