summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.WindowsUniversal/_58406EffectRenderer.cs
blob: 64a863b9fcb9438f7eb2488ce8e938586d1f55ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Linq;
using Windows.UI.Xaml.Controls;
using Xamarin.Forms;
using Xamarin.Forms.Controls.Issues;
using Xamarin.Forms.Platform.UWP;

[assembly: ExportEffect(typeof(Xamarin.Forms.ControlGallery.WindowsUniversal._58406EffectRenderer), Bugzilla58406.EffectName)]

namespace Xamarin.Forms.ControlGallery.WindowsUniversal
{
	public class _58406EffectRenderer : PlatformEffect
	{
		protected override void OnAttached()
		{
			var textBlock = Control as TextBlock;

			if (textBlock == null)
			{
				return;
			}

			textBlock.Text = new string(textBlock.Text.ToCharArray().Reverse().ToArray()); 
		}

		protected override void OnDetached()
		{
		}
	}
}