Nikita Tsukanov
feadefc1a1
Run Mono/FullNET tests for all "core" libs except Avalonia.Controls
7 years ago
Jeremy Koritzinsky
44bf2ee721
Add unit test and fix #2149 .
7 years ago
Jeremy Koritzinsky
1b2d644e48
Make tests in Avalonia.Base.UnitTests use ExpressionObserver.Create. For tests that require using invalid members or are more tedious to test with expression trees, test them in Avalonia.Markup.UnitTests with ExpressionObserverBuilder.
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
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
3eb5e0e200
Tweaked logging of binding errors.
1. Fixed some tests to expect `BindingNotification`s to be returned on a broken binding chain.
2. Changed logging of `BindingNotification`s - log at `Warning` level (instead of `Error`) except when the binding chain is broken at the root, in which case log at `Information` level. Do this to prevent flooding the output window when initializing.
9 years ago
Steven Kirk
7baa7dc0dd
Added GC.KeepAlive to tests.
Lots of `Avalonia.Markup.UnitTests` were failing intermittently. This is because in release mode, in a method like this:
```
[Fact]
public void SetValue_Should_Return_False_For_Missing_Object()
{
var data = new Class1();
var target = new ExpressionObserver(data, "Next.Bar");
using (target.Subscribe(_ => { }))
{
Assert.False(target.SetValue("baz"));
}
}
```
`data` can get GC'ed at any point after creating target. Added `GC.KeepAlive()` calls to prevent this.
Fixes #1035
Fixes #1036
Fixes #1037
9 years ago
Steven Kirk
11586a4d4c
Don't have async void tests.
That's bad. Also un-skip binding expression tests.
9 years ago
Steven Kirk
715149b1f5
Improve stream operator error message.
When a stream operator is applied to an unsupported type.
9 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
5a9be7d94a
Make sure new value is returned.
When a property value is set, if a new value isn't notified via INPC,
then send the new value after the set succeeds.
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
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
ac427192df
Use NotifyingBase in unit tests.
And rename NotifyingBase.SubscriptionCount ->
PropertyChangedSubscriptionCount as we also track ErrorsChanged
subscription count.
10 years ago
Steven Kirk
4906a472b0
Reimplemented data validation using BindingNotifications.
10 years ago
Steven Kirk
abdbcac79d
Added BindingNotification.
This will replace BindingError and IValidationStatus for bindings that want to notify binding/validation errors. Still WIP.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Jeremy Koritzinsky
814b6ebac7
Removed now unused test.
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
6a5208621e
Return BindingError from property plugins.
10 years ago
Steven Kirk
93884ea063
Added test for issue 284.
Moved NotifyingBase to Perspex.UnitTests in order to do this.
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
d87f585ead
Fixed changes affected by last commit.
10 years ago
danwalmsley
8c7412232c
Seperated testing of null and empty string triggering PropertyChangedEvent.
10 years ago
danwalmsley
ec9da47d6a
supporting null or string.empty to trigger property notifications.
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
7865743819
Added ElementName bindings.
10 years ago
Steven Kirk
6fd2ec36a2
Fixed directory name/namespace in tests.
To make it same as the namespace being tested.
10 years ago
Steven Kirk
d54772033b
Added DropDown theme in XAML.
Something weird is happening where selected items are removed from the
tree somehow.
10 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 .
10 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.
10 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.
10 years ago
Steven Kirk
62b8c5a40c
Added default type converter for bindings.
To convert between basic types. Closes #256 . Closes #270 .
10 years ago
Steven Kirk
43a66901fc
Remove ExpressionValue.
Use PerspexProperty.UnsetValue instead.
11 years ago
Steven Kirk
072aa3c96d
Allow ExpressionObserver root to be changed.
11 years ago
Steven Kirk
d55e7fa9d0
Search base classes for properties.
11 years ago
Steven Kirk
774a9c0911
Implemented binding negation.
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