summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/VisualElementExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/VisualElementExtensions.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/VisualElementExtensions.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/VisualElementExtensions.cs b/Xamarin.Forms.Platform.Android/VisualElementExtensions.cs
index 13f2fffa..800a967e 100644
--- a/Xamarin.Forms.Platform.Android/VisualElementExtensions.cs
+++ b/Xamarin.Forms.Platform.Android/VisualElementExtensions.cs
@@ -1,7 +1,19 @@
+using System;
+
namespace Xamarin.Forms.Platform.Android
{
public static class VisualElementExtensions
{
+ public static IVisualElementRenderer GetRenderer(this VisualElement self)
+ {
+ if (self == null)
+ throw new ArgumentNullException("self");
+
+ IVisualElementRenderer renderer = Platform.GetRenderer(self);
+
+ return renderer;
+ }
+
public static bool ShouldBeMadeClickable(this View view)
{
var shouldBeClickable = false;