summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/BindingBaseExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/BindingBaseExtensions.cs')
-rw-r--r--Xamarin.Forms.Core/BindingBaseExtensions.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/BindingBaseExtensions.cs b/Xamarin.Forms.Core/BindingBaseExtensions.cs
new file mode 100644
index 00000000..a52c5cb1
--- /dev/null
+++ b/Xamarin.Forms.Core/BindingBaseExtensions.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace Xamarin.Forms
+{
+ internal static class BindingBaseExtensions
+ {
+ internal static BindingMode GetRealizedMode(this BindingBase self, BindableProperty property)
+ {
+ if (self == null)
+ throw new ArgumentNullException("self");
+ if (property == null)
+ throw new ArgumentNullException("property");
+
+ return self.Mode != BindingMode.Default ? self.Mode : property.DefaultBindingMode;
+ }
+ }
+} \ No newline at end of file