summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs')
-rw-r--r--Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs b/Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs
new file mode 100644
index 0000000..35d0f26
--- /dev/null
+++ b/Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs
@@ -0,0 +1,21 @@
+´╗┐using System;
+using AppKit;
+
+namespace Xamarin.Forms.Platform.MacOS
+{
+ internal static class AlignmentExtensions
+ {
+ internal static NSTextAlignment ToNativeTextAlignment(this TextAlignment alignment)
+ {
+ switch (alignment)
+ {
+ case TextAlignment.Center:
+ return NSTextAlignment.Center;
+ case TextAlignment.End:
+ return NSTextAlignment.Right;
+ default:
+ return NSTextAlignment.Left;
+ }
+ }
+ }
+} \ No newline at end of file