A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
999 B

using System;
namespace Perspex.Xaml.Base.UnitTest
{
using Controls;
using Markup.Xaml.DataBinding;
using Markup.Xaml.DataBinding.ChangeTracking;
public class BindingDefinitionBuilder
{
private readonly BindingMode bindingMode;
private readonly PropertyPath sourcePropertyPath;
private Control target;
private PerspexProperty targetProperty;
public BindingDefinitionBuilder()
{
bindingMode = BindingMode.Default;
sourcePropertyPath = new PropertyPath(string.Empty);
}
public BindingDefinitionBuilder WithNullTarget()
{
target = null;
return this;
}
public XamlBindingDefinition Build()
{
return new XamlBindingDefinition(
bindingMode: bindingMode,
sourcePropertyPath: sourcePropertyPath,
target: target,
targetProperty: targetProperty);
}
}
}