summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/TemplateExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/TemplateExtensions.cs')
-rw-r--r--Xamarin.Forms.Core/TemplateExtensions.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/TemplateExtensions.cs b/Xamarin.Forms.Core/TemplateExtensions.cs
new file mode 100644
index 00000000..3e62c52d
--- /dev/null
+++ b/Xamarin.Forms.Core/TemplateExtensions.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace Xamarin.Forms
+{
+ public static class TemplateExtensions
+ {
+ public static void SetBinding(this DataTemplate self, BindableProperty targetProperty, string path)
+ {
+ if (self == null)
+ throw new ArgumentNullException("self");
+
+ self.SetBinding(targetProperty, new Binding(path));
+ }
+ }
+} \ No newline at end of file