summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.MacOS/Extensions/AlignmentExtensions.cs
blob: 35d0f26cc1f415ed9c578a3d12aaef8caccdc5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
			}
		}
	}
}