Steven Kirk
4d01dacd77
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony.
6 years ago
Dariusz Komosinski
8e60e83d4c
Reduce memory usage of binding operations.
6 years ago
Dariusz Komosinski
868b5ea840
Update WeakReference usages to use the generic one.
7 years ago
Jeremy Koritzinsky
590f5923a8
Traverse transform nodes in the correct order when setting a binding source value.
7 years ago
Miha Markič
eb93c9f4a7
Spellchecks comments and code in Avalonia.Base
8 years ago
Jeremy Koritzinsky
f6fc30665e
Fix nits.
8 years ago
Jeremy Koritzinsky
dbc942b066
Add XML docs.
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
Steven Kirk
dadc30d84e
Use lightweight observable for ExpressionObserver.
8 years ago
Jeremy Koritzinsky
c6c51dd36f
Add pattern-based support for streaming. Fix bugs in method bindings.
8 years ago
Jeremy Koritzinsky
af186e3529
Move string-based binding paths up to Avalonia.Markup. Make the LINQ Expression paths and raw ExpressionNodes (now public) the primarily supported syntax.
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
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
Jeremy Koritzinsky
e8c32bf801
Preliminary support. Indexers require more work since the compiler doesn't generate IndexExpressions (they weren't in S.L.Expressions v1 so they aren't auto-genned).
8 years ago
Jeremy Koritzinsky
54e8187a70
Fix StackOverflow in Negation Binding. Fixes #1213
9 years ago
Jeremy Koritzinsky
12ec059acb
Initial code to enable binding to a method.
9 years ago
Jeremy Koritzinsky
aacb052253
Made changes requested by @grokys .
9 years ago
Jeremy Koritzinsky
b038ed55ee
Add ability to set the value pointed to by an indexer node.
9 years ago
Steven Kirk
b6c51b34ef
Renamed ValueHandler -> StreamPlugin
10 years ago
Steven Kirk
715149b1f5
Improve stream operator error message.
When a stream operator is applied to an unsupported type.
10 years ago
Steven Kirk
7cb001801a
Try to improve logged binding errors.
- Don't log an error when the target for the root ExpressionNode is
null. This is usually because the `DataContext` hasn't been set up yet
and it spewed a load of useless error messages.
- Add a Description field to `ExpressionObserver` that can be used in
the case of e.g. #control bindings to record the whole expression (with
the "#control" part) rather than just the part tracked by the
`ExpressionObserver`.
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
91b855b056
Convert to WeakReference in ExpressionObserver.
Doing a `Publish().Refcount()` caches the latest value so it can be sent
to subsequent subscribers, and this causes a leak. Convert the value
to/from `WeakReference` for that part.
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
daff817ce4
Subscribe to ExpressionSubject before setting value.
The inner `ExpressionObserver` must be subscribed to as setting the
value requires the expression to be evaluated.
10 years ago
Steven Kirk
c5c60c483a
Add concept of "value plugins".
These are used to extensibly handle special values like `Task` and
`IObservable<>`. Previously this was baked into the expression observer
architecture with a TODO comment saying that it needs to be extensible.
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
da5fd06fcd
Moved validation filtering into ExpressionObserver and out of InstancedBinding, PerspexObject, and the Priority* system. Renamed some methods in this system to be more descriptive.
10 years ago
Jeremy Koritzinsky
ee486113e5
Finished wiring up validation support. Now exceptions and INotifyDataErrorInfo implementers will set controls into their ":invalid" pseudo-class state.
10 years ago
Steven Kirk
886fbb5458
Make ExpressionObserver accept a priority for sets.
This makes auto-expanding the treeview in DevTools work again.
10 years ago
Steven Kirk
3d271cd020
Started implementing weak bindings.
Tests currently failing as WeakSubscriptionManager doesn't support
unsubscribing yet.
10 years ago
Steven Kirk
6b99bcf30b
Use LastOrDefaultAsync for completion.
10 years ago
Steven Kirk
45207dd7c6
Make ExpressionObserver complete...
When rootObservable or _update completes.
10 years ago
Steven Kirk
23cc9a2ff4
Allow binding to element without path.
Closes #365 .
10 years ago
Steven Kirk
5f0a6c9d72
Use observable to signal update...
...in ExpressionObserver, instead of calling UpdateRoot. This should
avoid a leak.
10 years ago
Steven Kirk
318be5196d
Added some ExpressionObserver lifetime tests.
10 years ago
Steven Kirk
8fb9c5c8e7
Fixed problem with binding DataContext.
Bindings such as <Foo DataContext="{Binding Bar}"/> were not working.
10 years ago
Steven Kirk
67835cc09b
Applied a bunch of resharper suggestions.
10 years ago
Steven Kirk
7865743819
Added ElementName bindings.
11 years ago
Steven Kirk
af79e21fde
Added Menu XAML styles.
11 years ago
Steven Kirk
d54772033b
Added DropDown theme in XAML.
Something weird is happening where selected items are removed from the
tree somehow.
11 years ago
Steven Kirk
3427b7655b
Added PerspexProperty plugin to ExpressionObserver.
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
d2cc993a3e
Fixed DataContext binding problem.
Described by XamlBindingTest.Should_Not_Write_To_Old_DataContext.
Problem still remains with ListBox.SelectedItems however, that's going
to require something more.
11 years ago
Steven Kirk
62b8c5a40c
Added default type converter for bindings.
To convert between basic types. Closes #256 . Closes #270 .
11 years ago