diff options
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/HorizontalTextAlignmentConverter.cs')
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/HorizontalTextAlignmentConverter.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/HorizontalTextAlignmentConverter.cs b/Xamarin.Forms.Platform.WinRT/HorizontalTextAlignmentConverter.cs new file mode 100644 index 00000000..f4f26d1a --- /dev/null +++ b/Xamarin.Forms.Platform.WinRT/HorizontalTextAlignmentConverter.cs @@ -0,0 +1,24 @@ +using System; + +#if WINDOWS_UWP + +namespace Xamarin.Forms.Platform.UWP +#else + +namespace Xamarin.Forms.Platform.WinRT +#endif +{ + public class HorizontalTextAlignmentConverter : Windows.UI.Xaml.Data.IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + var textAlign = (TextAlignment)value; + return textAlign.ToNativeTextAlignment(); + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotSupportedException(); + } + } +}
\ No newline at end of file |