Added more documentation about binding.

This commit is contained in:
Steven Kirk 2014-12-08 10:50:24 +01:00
Родитель dc6a6feb49
Коммит f2649d06d6
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -109,6 +109,24 @@ Nice... Lets take this further:
Yep, by putting a bang in front of the property name you can **bind** to a property (attached or
otherwise) from the object initializer.
Binding to a property on another control? Easy:
var control = new Control
{
Property1 = "Foo",
[Attached.Property] = "Bar",
[!Property2] = anotherControl[!Property1],
}
Two way binding? Just add two bangs:
var control = new Control
{
Property1 = "Foo",
[Attached.Property] = "Bar",
[!!Property2] = anotherControl[!!Property1],
}
## Visual and Logical trees
Perspex uses the same visual/logical tree separation that is used by WPF (and to some extent HTML