|
|
|
@ -61,20 +61,11 @@ namespace Perspex.Markup.Xaml.Data |
|
|
|
/// </summary>
|
|
|
|
public object Source { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a subject that can be used to get and set the value of the binding.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="target">The target instance.</param>
|
|
|
|
/// <param name="targetProperty">The target property. May be null.</param>
|
|
|
|
/// <param name="treeAnchor">
|
|
|
|
/// For `ElementName` bindings to elements that are not themselves controls, describes
|
|
|
|
/// where in the logical tree to begin searching for the named element.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>An <see cref="ISubject{Object}"/>.</returns>
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public ISubject<object> CreateSubject( |
|
|
|
IPerspexObject target, |
|
|
|
PerspexProperty targetProperty, |
|
|
|
IPerspexObject treeAnchor = null) |
|
|
|
object anchor = null) |
|
|
|
{ |
|
|
|
Contract.Requires<ArgumentNullException>(target != null); |
|
|
|
|
|
|
|
@ -86,7 +77,7 @@ namespace Perspex.Markup.Xaml.Data |
|
|
|
if (pathInfo.ElementName != null || ElementName != null) |
|
|
|
{ |
|
|
|
observer = CreateElementObserver( |
|
|
|
(target as IControl) ?? (treeAnchor as IControl), |
|
|
|
(target as IControl) ?? (anchor as IControl), |
|
|
|
pathInfo.ElementName ?? ElementName, |
|
|
|
pathInfo.Path); |
|
|
|
} |
|
|
|
|