Steven Kirk
6d0e461349
Throw if no matching property accessor found.
This shouldn't happen normally as `InpcPropertyAcessorPlugin` matches everything.
8 years ago
Steven Kirk
0c078c9dec
Don't use rx for ExpressionNodes.
`ExpressionNode`s were always single-subscriber and making them use `IObservable<>` meant that we had to have extra allocations in order to return `IDisposable`s. Instead of using `IObservable` use a simpler `Subscribe`/`Unsubscribe` pattern. This saves a bunch more memory.
8 years ago
Jeremy Koritzinsky
1c3b714a0e
Move fix up to SettableNode and ExpressionNode so all settable node types (i.e. PropertyAccessor and Indexer nodes) can get the fix.
8 years ago
Jeremy Koritzinsky
5ea9677cb9
Use WeakReferences to make sure we aren't accidentally keeping objects alive in this new cache.
8 years ago
Jeremy Koritzinsky
41b20f63f0
Move fix up to PropertyAccessorNode from InpcPropertyAccessorPlugin.
8 years ago
Jeremy Koritzinsky
cf8244b37a
Move current contents of Avalonia.Markup to Avalonia.Base. Move Avalonia.Markup.Xaml.Data/Parser classes to Avalonia.Markup since they're not Xaml-specific.
Use pattern-matching switch.
Fix bug from cleanup.
8 years ago
Steven Kirk
24acd4cd24
Allow binding to CLR properties on AvaloniaObject.
`AvaloniaPropertyAccessorPlugin` now checks that the requested property is available as a `AvaloniaProperty` on the target, and if not returns a `false` match. This means that the binding will be passed on to the `InpcPropertyAccessorPlugin`.
There was a problem in `WeakSubscriptionManager` in that an `AvaloniaObject` exposes 2 `PropertyChanged` events and `WeakSubscriptionManager` was picking up the `AvaloniaObject` one. Had to make `WeakSubscriptionManager.Subscribe` generic on the target parameter so that the requested event (`INotifyPropertyChanged.PropertyChanged`) was found instead.
9 years ago
Jeremy Koritzinsky
b038ed55ee
Add ability to set the value pointed to by an indexer node.
10 years ago
Steven Kirk
c2a14f9db7
Swapped names in ExpressionNode.
Swapped names of StartListening and StartListeningCore - method names
ending with Core should be the subclass implementation.
10 years ago
Steven Kirk
f59c16bc00
Improve broken binding diagnostic messages.
10 years ago
Steven Kirk
57a611533c
Added Data Annotations validation.
10 years ago
Steven Kirk
50b0b687cd
Moved some leak tests to LeakTests.
So they can be debugged in dotMemory.
10 years ago
Steven Kirk
2f72295657
Started refactor of ExpressionObserver.
Tying to be more "rx", but also will allow us to move forward on BindingNotification changes.
10 years ago
Steven Kirk
4906a472b0
Reimplemented data validation using BindingNotifications.
10 years ago
Steven Kirk
5c33fbc6ee
Reimplemented property validation.
As far as it was in `property-validation-grokys` branch. Things were
messed up on master so had to merge this manually so may be problems.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Jeremy Koritzinsky
aab4331a52
Changed validation on controls to allow notifications from multiple types of validation and correctly report if it is valid. Changed initalization of validation plugins to nest within each other so there can be multiple active at once.
11 years ago
Jeremy Koritzinsky
ee486113e5
Finished wiring up validation support. Now exceptions and INotifyDataErrorInfo implementers will set controls into their ":invalid" pseudo-class state.
11 years ago
Jeremy Koritzinsky
f882e14e41
Added support for IPropertyAccessor's to listen for error notifications from a target that implements INotifyDataErrorInfo.
11 years ago
Steven Kirk
6a5208621e
Return BindingError from property plugins.
11 years ago
Steven Kirk
886fbb5458
Make ExpressionObserver accept a priority for sets.
This makes auto-expanding the treeview in DevTools work again.
11 years ago
Steven Kirk
3d271cd020
Started implementing weak bindings.
Tests currently failing as WeakSubscriptionManager doesn't support
unsubscribing yet.
11 years ago
Steven Kirk
06f59e57f4
Started adding an ExpressionObserver plugin system.
So that we can handle PerspexObjects etc in an extensible fashion.
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
3cda7774c5
Use GetRuntimeProperty here.
As it automatically looks in base classes.
11 years ago
Steven Kirk
62b8c5a40c
Added default type converter for bindings.
To convert between basic types. Closes #256 . Closes #270 .
11 years ago
Steven Kirk
f1ca851833
Fix setting expression value on broken chain.
Closes #254 .
11 years ago
Steven Kirk
43a66901fc
Remove ExpressionValue.
Use PerspexProperty.UnsetValue instead.
11 years ago
Steven Kirk
8139198486
Check property can be written...
...before attempting to do so
11 years ago
Steven Kirk
3730d6067f
Add workaround for ReactiveCommand.
11 years ago
Steven Kirk
d55e7fa9d0
Search base classes for properties.
11 years ago
Steven Kirk
482dfa0174
Handle completed tasks.
11 years ago
Steven Kirk
b252fdaeb1
Implemented scheduling for ExpressionObserver.
11 years ago
Steven Kirk
9b71fc9ce9
Added support for binding to Observables and Tasks
Thread synchronization is not currently implemented. Task tests fail
because of this: putting a Thread.Sleep before the Assert makes them
pass. Need to work out how we're going to do async unit testing.
11 years ago
Steven Kirk
d43a79fab5
Wrote binding expression parser by hand.
Sprache couldn't cope with it as it requires a left-recursive grammar.
11 years ago
Steven Kirk
0f5af3db63
Use Sprache for parsing expressions.
Use sprache instead of Roslyn for parsing expressions. One test still failing.
11 years ago
Steven Kirk
e3b6ce4186
Add support for indexers in binding expressions.
11 years ago
Steven Kirk
774a9c0911
Implemented binding negation.
11 years ago
Steven Kirk
962c1ea01b
Pass SetValue through expression chain.
11 years ago
Steven Kirk
6e264dccc4
Allow setting values via ExpressionObserver.
11 years ago
Steven Kirk
cf3834755d
More ExpressionObserver tests.
11 years ago
Steven Kirk
005cd231cc
Initial implementation of ExpressionObserver.
11 years ago