Steven Kirk
bc4eefcf1b
Add `IndexRange` list add/remove methods.
Add or remove index ranges from a list of index ranges, merging and splitting ranges as required.
6 years ago
Steven Kirk
fcaa250c72
Ported fix and test from WinUI.
https://github.com/microsoft/microsoft-ui-xaml/pull/1922
6 years ago
Steven Kirk
27e11150b7
Make comparing IndexPath with null do something useful.
6 years ago
Steven Kirk
d615cdebcb
Add nullability annotations to SelectionModel etc.
And ran a few of VS' lightbulb suggestions.
6 years ago
Steven Kirk
e4c6c85826
Refactor IndexPath.
- #nullable enable
- Make it a `readonly struct`
- Most of the time it will only hold a single `int`, so optimize for the common case by having an `int _index` field
- Make `_path` an array rather than a list as it will be fixed-size
- Implement equality
- Implement operators
6 years ago
Steven Kirk
6bd7b4f335
Ported SelectionModel and friends from WinUI.
6 years ago
Steven Kirk
640a5c5d8b
Swap order of parameters to event args.
As described in #3437 the argument ordering was different to WPF/UWP causing bugs in some code ported from WPF/UWP. Use the same argument ordering as WPF/UWP.
Fixes #3437
6 years ago
Dariusz Komosinski
cf8aa6ecac
Optimize Color equality checks.
6 years ago
Steven Kirk
399417692f
Revert "Removed unused owner reference."
This reverts commit d0e2a844db .
6 years ago
Steven Kirk
3bc1594dca
Revert "Removed unused field."
This reverts commit 270f9718b8 .
6 years ago
Steven Kirk
7f26635efa
Wire up validation/coercion for attached properties.
6 years ago
Steven Kirk
c6acca57c4
Fix method name after merge.
6 years ago
Jumar Macato
7e42523008
Additional sanity checks for monitor resolution
6 years ago
Dan Walmsley
32df775398
Add hack to prevent renderer crashing on 0x0 window x11.
6 years ago
Dan Walmsley
1f1d3a8e35
prevent crashing in finalizer
6 years ago
Dan Walmsley
9fc7842eef
Revert "X11 backend wont crash with 0 sized window."
This reverts commit d49109877c .
6 years ago
Dan Walmsley
d49109877c
X11 backend wont crash with 0 sized window.
6 years ago
Dan Walmsley
f56a891a0f
prevent possibility of double cancellation of main loop.
6 years ago
Dan Walmsley
9df55b02d4
Use loopcancellation instead of adding a seperate api.
6 years ago
Steven Kirk
69e702320b
Added some documentation to value stores.
6 years ago
Steven Kirk
4cc378ea0f
Property store can be typed on IValue.
6 years ago
Steven Kirk
a1353c7715
Remove unused method.
6 years ago
Steven Kirk
6f92e3786a
Fix typo.
6 years ago
Steven Kirk
3a80cee3fc
Add nullability annotations.
6 years ago
Steven Kirk
c2d5f62390
Avoid boxing if property is correct type.
For typed bindings, we'll have an `AvaloniaPropertyChangedEventArgs<T>` where `T` is the same as the type of the `AvaloniaPropertyObservable`. For non-typed bindings we'll have `object` as `T` so use the non-typed `AvaloniaProperty`.
6 years ago
Steven Kirk
1ff6e35a06
Disable nullable around generic T.
Compiler warns that `_value` is potentially null, but it can be a value or refernce type.
6 years ago
Steven Kirk
270f9718b8
Removed unused field.
6 years ago
Steven Kirk
f7f9e41bf7
Setter not needed.
6 years ago
Steven Kirk
fa81c42c56
BindingValue should be marked [Flags].
6 years ago
Dan Walmsley
c3fb152597
Working exception dispatch
6 years ago
Dan Walmsley
69c0521c5e
Add methods for dispatching exceptions on osx.
6 years ago
Dan Walmsley
c35755857c
basic implementation of exception dispatch on avalonia.native.
6 years ago
Steven Kirk
d0e2a844db
Removed unused owner reference.
6 years ago
Steven Kirk
00c1c35125
Go direct to property store.
To avoid a call to `VerifyAccess` (which shows up when profiling).
6 years ago
Steven Kirk
afce4460dd
Removed useless default values.
There's already an overload without the parameter.
6 years ago
Steven Kirk
685f3f7b6e
Fix typos.
6 years ago
Rustam Sayfutdinov
694585ce68
Fix typo in the doc for Color properties
6 years ago
Dariusz Komosiński
a238fd33f0
Unify SelectingItemsControl init handling and add extra checks to ensure correctness.
6 years ago
Steven Kirk
5805eaf0f9
Fix compile errors after merge with master.
Due to `OnPropertyChanged` signature changing on branch.
6 years ago
Steven Kirk
ef42e9350d
Add doc comment for NonVirtualizingLayoutContext.
6 years ago
Steven Kirk
155915134e
Use correct context type.
6 years ago
José Pedro
dcab86a12e
Fixed drag and drop obsolete API usage.
6 years ago
Dariusz Komosinski
b400b45e0a
Use expression bodied events and properties.
6 years ago
Dariusz Komosinski
35f26081c6
Implement events for ToggleButton.
6 years ago
Steven Kirk
c6e6ad5678
Fix bug with UniformGridLayout MaximumRowsOrColumns and requested size
Ported from 007ab33a66
6 years ago
Steven Kirk
0236ced64f
Fix ItemsRepeater overwriting DataContext
Ported from 0e24e05dbd
6 years ago
Steven Kirk
bb7276d568
Extend the fix for Recycling the focused element to non virtualized l…
…ayouts
* Ensure that we set the m_processingItesmSourceChange flag for non-virtualizing layouts as well as virtualizing ones.
Ported from cc335ac391
6 years ago
Steven Kirk
09297dbb08
Fix repeater holding onto elements
If a consumer changes the ItemsSource with a non recycling layout then the items from the old source would be perpetually held by repeater, a potentially substantial leak.
Ported from e158eec3e9
6 years ago
Steven Kirk
1f46076f16
Use NonVirtualizingLayoutContext.
- Add and use `NonVirtualizingLayoutContext` in `NonVirtualizingLayout`
- Return -1 instead of throwing if element is not a child of `ItemsRepeater`
Ported from 22adf4dc62
6 years ago
Steven Kirk
261e477522
ItemsRepeater fix.
* Remove item from repeater children if there is no itemtemplate when being recycled.
Ported from c4d4d9995a
6 years ago