Steven Kirk
844da05fe8
Revert "Only send BindingNotifications on error."
This reverts commit 57e646583f .
For TextBox there can be 2 bindings to Text: one which is the binding to the
view model which should have data validation enabled, and another binding to
the TextPresenter in the template which should not have data validation
enabled, or it will override the view model data validation. For this we need
to be able to distinguish between the two and so bindings with data validation
enabled need to always send BindingNotifications.
Conflicts:
src/Avalonia.Base/AvaloniaObject.cs
tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Validation.cs
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
941246e75c
Started to implement data validation on TextBox.
Not working still - added a failing test to demonstrate it.
10 years ago
Steven Kirk
760adfc126
Update BindingTest with changes.
Data validation still doesn't work in BindingTest though.
10 years ago
Steven Kirk
99a635f31f
Remove data validation for non-direct properties.
We're going to say that for the moment only direct properties handle
data validation. This gets around a few thorny issues with data
validation on styled properties.
10 years ago
Steven Kirk
edc538185f
Handle BindingNotifications in SetValue.
As one-time bindings don't set up a binding as such: they just call
`SetValue`.
10 years ago
Steven Kirk
5bd0d327fe
Added missing file in .csproj.
10 years ago
Steven Kirk
d27cab10b5
Added more data validation tests, some failing.
10 years ago
Steven Kirk
66b7b547c4
Add missing file to .csproj.
10 years ago
Steven Kirk
ecfe572465
FIx failing test.
Introduced in a refactoring a few commits ago where I saw code that
looked wrong. It wasn't wrong, it's just the mechanism is a little
unintuitive. Added a comment explaining the reasoning.
10 years ago
Steven Kirk
57e646583f
Only send BindingNotifications on error.
Assume that a normal value when received by a property with data
validation enabled means no error.
10 years ago
Steven Kirk
736d290f19
Fixed typo.
10 years ago
Steven Kirk
f720a7d66f
Test that BindingNotificationReceived is called.
For direct properties.
10 years ago
Steven Kirk
92ebb7f6d8
Log meaningful message for AggregateException.
10 years ago
Steven Kirk
74e870333b
Correctly convert BindingNotifications.
In ExpressionSubject.
10 years ago
Steven Kirk
f618103518
Fix casting of BindingNotification value.
10 years ago
Steven Kirk
5a9371f786
Pass EnableDataValidation to ExpressionObserver.
10 years ago
Steven Kirk
f4c57b169b
Handle BindingNotifications in ExpressionSubject.
10 years ago
Steven Kirk
06b0d15fc2
Surface BindingNotifications in AvaloniaObject.
10 years ago
Steven Kirk
4fe2a3d86c
Removed vestiges of old data validation.
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
0b0ca8b0cb
Fix MemberSelector.
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
4ffae3eb55
Added IndeiBase
And use it as base class for test data that implements
INotifyDataErrorInfo. Removed IndeiValidatorTests as its been
superceeded by IndeiValidationPluginTests.
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
7a53f46330
Merge branch 'master' into indexer-bindings
10 years ago
Steven Kirk
8d6de2d383
Merge branch 'pr/592'
10 years ago
Steven Kirk
6eaa5b74dc
Test has been refactored into 2 tests.
Removed test that has been refactored into 2 separate tests. Thanks
@donandren for finding those bugs!
10 years ago
Steven Kirk
1c88b3bd85
Fix scrolling to item when size == 0,0
When virtualized presenter size == 0,0 no containers will be
materialized so no container will be found.
Fixes #591 .
10 years ago
Steven Kirk
dd728dae5b
Fix measuring to infinity when scrolled to end.
When a virtualized list was scrolled to the bottom and then the list was
measured with a size larger than needed to fit all items (in this case
we use infinity) then the virtualizer tries to go backwards to add items
at the top of the currently visible items by setting `step = -1`;
however it didn't check whether the current index was < 0.
Fixes #589 .
10 years ago
Steven Kirk
1d61713e51
Merge pull request #603 from wieslawsoltes/SwitchTravisToMonoLatestBranch
Switch TravisCI to use mono latest instead of nightly
10 years ago
Wiesław Šoltés
5ffdcf73da
Switch TravisCI to use mono latest instead of nightly
This is related to this issue https://github.com/travis-ci/travis-ci/issues/6319 , which is causing CI to fail installing mono runtime.
10 years ago
Steven Kirk
ba63c2964f
Merge pull request #597 from yusuf-gunaydin/Issue-596
Fixes #596
10 years ago
yusuf-gunaydin
282082a05e
Setter does not build the template if the target property derives from ITemplate.
10 years ago
Steven Kirk
2b7ed4eeb7
Merge pull request #595 from wieslawsoltes/TraisCISupportForMacOSX
Added initial osx support to TravisCI build matrix
10 years ago
Wiesław Šoltés
2e272ec4f5
Added initial osx support to TravisCI build matrix
10 years ago
Steven Kirk
5a42f99025
Added this operator binding test.
10 years ago
Steven Kirk
6fece5737d
Merge pull request #584 from wieslawsoltes/FixSkiaSetFillRule
Fix Skia SetFillRule
10 years ago
Steven Kirk
3ee83263c8
Make indexer produce/consume IBinding.
10 years ago
donandren
cfd6524031
added failing unit test for issue #589 and #591
10 years ago
Steven Kirk
2a614326e3
Remove skia initialization.
No longer needed as we now use a nuget. Also there are >1 submodules now.
10 years ago
Jeremy Koritzinsky
9d2ef79432
Merge pull request #586 from wieslawsoltes/UpdateNugetPackagesAndReferences
Update nuget packages and references
10 years ago
Wiesław Šoltés
8eebf738f3
Move border object initialization
10 years ago
Wiesław Šoltés
2681340e9c
Added missing NuGet packages to fix TravisCI builds
10 years ago
Wiesław Šoltés
36414687fc
Added missing NuGet packages to fix TravisCI builds
10 years ago