Browse Source

Fix binding mode checks.

BindingMode.Default should be equivalent to BindingMode.OneWay.
Steven Kirk 10 years ago
parent
commit
1268e612c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Perspex.Base/PerspexObject.cs

+ 1 - 1
src/Perspex.Base/PerspexObject.cs

@@ -184,7 +184,7 @@ namespace Perspex
                     binding.Mode;
                     binding.Mode;
                 var sourceBinding = value as BindingDescriptor;
                 var sourceBinding = value as BindingDescriptor;
 
 
-                if (sourceBinding == null && mode != BindingMode.OneWay)
+                if (sourceBinding == null && mode > BindingMode.OneWay)
                 {
                 {
                     throw new InvalidOperationException("Can only bind OneWay to plain IObservable.");
                     throw new InvalidOperationException("Can only bind OneWay to plain IObservable.");
                 }
                 }