Steven Kirk
079d481e36
Renamed ExpressionSubject -> BindingExpression.
`ExpressionSubject` wasn't a good name as the important thing it isn't
convert an `ExpressionObserver` into an `ISubject`. The important thing
it does is insert an `IValueConverter` into the pipeline.
10 years ago
Steven Kirk
a560c3b6d3
Use WeakReference in BindingNotification.
So that it doesn't keep objects alive when cached by
`.Publish().RefCount()` in `ExpressionObserver`. Added a leak test to
test that.
10 years ago
Steven Kirk
0c2057e458
Fix failing tests, add other tests.
Also use logical parent's DataContext as base for DataContext bindings
instead of visual parent's. Was previously in error.
10 years ago
Steven Kirk
0d4a613580
Updated some docs.
And simplified a bit of failing test code.
10 years ago
Steven Kirk
5a42f99025
Added this operator binding test.
10 years ago
Steven Kirk
7018b3c36d
Removed test.
Decided that we shouldn't do this.
10 years ago
Steven Kirk
f24ab044f7
Added failing binding tests.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
8209a85193
Make IBinding return an InstancedBinding.
Instead of an ISubject<object> as this was wasteful when a OneTime or
OneWay binding was required.
10 years ago
Steven Kirk
ffbd694bf7
Implemented Binding.FallbackValue.
Closes #238 .
10 years ago
Steven Kirk
bb759a8785
We can now override the default binding mode.
So make TextBlock and TextBox have different default binding modes.
10 years ago
Steven Kirk
1202eaa876
Updated PerspexProperties to new classes
i.e. AttachedProperty, DirectProperty or StyledProperty.
10 years ago
Steven Kirk
1841e7ad7a
Start allowing Setters to contain bindings.
This is needed so that things like the following can be done:
<TreeView>
<TreeView.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
</Style>
</TreeView.Styles>
<TreeView>
(At the moment we have TreeDataTemplate.IsExpanded but this isn't good
enough: it only supports setting IsExpanded on creation of the item with
no binding.)
With this commit, setters can now contain bindings, but they aren't yet
applied correctly. As part of this commit, classes related to binding
have been moved to the Perspex.Data namespace.
10 years ago
Steven Kirk
30a756fb83
Refactored binding somewhat.
- Simplified PerpsexObject interface to a simplified single interface,
IPerspexObject
- Moved GetObservable etc to extension method
10 years ago
Steven Kirk
8fb9c5c8e7
Fixed problem with binding DataContext.
Bindings such as <Foo DataContext="{Binding Bar}"/> were not working.
11 years ago
Steven Kirk
b9992c582c
Added binding ConverterParameter.
Closes #317 .
11 years ago
Steven Kirk
1044154279
Bind to other controls with #control syntax.
Rather than specifying ElementName separately, allow binding using a "#control.Property" property path.
11 years ago
Steven Kirk
d1acf43253
Started fixing up MultiBinding.
11 years ago
Steven Kirk
e301e56a9d
Start making Converters work.
When passed to Binding. Found another problem with OmniXAML which means
we can't continue along this road: OmniXAML issue #50 .
11 years ago
Steven Kirk
b230c3b3f3
Renamed XamlBinding -> Binding
Had to also rename enclosing namespace from Binding to Data as classes
with same name as a namespace cause problems.
11 years ago
Steven Kirk
52b6c0feac
Fixed TemplatedParent binding.
Was doing stupid stuff before.
11 years ago
Steven Kirk
785238bdf1
Merged XamlBinding and XamlTemplateBinding.
11 years ago
Steven Kirk
843eb65dea
Bind DataContext to Parent.DataContext.
Need to special-case binding to DataContext as previously it was trying
to bind to itself. When binding to DataContext, we're binding to the
*parent* DataContext.
11 years ago
Steven Kirk
9d88f91852
Determine binding target at time of bind.
This is needed in order to be able to use bindings as selectors, e.g.
for TreeDataTemplate.ItemsSelector.
11 years ago
Steven Kirk
1064fbd186
Implement OneTime binding.
11 years ago
Steven Kirk
4f09de4dfe
Started adding XamlBinding unit tests.
11 years ago