diff --git a/samples/BindingTest/MainWindow.paml b/samples/BindingTest/MainWindow.paml
index 38e7c14d40..3ac2621738 100644
--- a/samples/BindingTest/MainWindow.paml
+++ b/samples/BindingTest/MainWindow.paml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/Markup/Perspex.Markup.Xaml/Binding/XamlBinding.cs b/src/Markup/Perspex.Markup.Xaml/Binding/XamlBinding.cs
index 1bd2e86fd5..3e3e978f7c 100644
--- a/src/Markup/Perspex.Markup.Xaml/Binding/XamlBinding.cs
+++ b/src/Markup/Perspex.Markup.Xaml/Binding/XamlBinding.cs
@@ -5,6 +5,7 @@ using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using OmniXaml.TypeConversion;
+using Perspex.Controls;
using Perspex.Markup.Binding;
namespace Perspex.Markup.Xaml.Binding
@@ -26,8 +27,6 @@ namespace Perspex.Markup.Xaml.Binding
public PerspexProperty TargetProperty { get; set; }
- public object Source { get; set; }
-
public string SourcePropertyPath { get; set; }
public BindingMode BindingMode { get; set; }
@@ -39,20 +38,10 @@ namespace Perspex.Markup.Xaml.Binding
public ExpressionObserver CreateExpressionObserver()
{
- var path = SourcePropertyPath;
- var source = Source;
-
- if (source == null)
- {
- if (!string.IsNullOrWhiteSpace(path))
- {
- path = "DataContext." + path;
- }
-
- source = Target;
- }
-
- return new ExpressionObserver(source, path);
+ var result = new ExpressionObserver(null, SourcePropertyPath);
+ var dataContext = Target.GetObservable(Control.DataContextProperty);
+ dataContext.Subscribe(x => result.Root = x);
+ return result;
}
internal void Bind(ISubject