* Update to xunit.v3
* Little more progress
* More fixes
* Keep VSTest supported
* Adjust Nuke
* Few fixes
* Fix for xunit 2
* Fix GetData override
* Adjust
* Use MTP for xunit 2
* Fix test
* Better fix
* --no-progress
* Few more fixes
* no progress
* Fix test
* Better fix
* TRX
* Move to Directory.Build.props
* Unify on MTP v2
* Update
* Update to stable
* 1.0.1
* 1.0.2
* Fix some warnings
* Fix more warnings
* Fix more warnings
* Add unit test for sub menu item testing
* Parent menu items should not be disabled on command binding failure.
If a menu has a failed `Command` binding, but also has sub-menu items, then it should not be disabled.
---------
Co-authored-by: Anastassia Pellja <anyka545@gmail.com>
* Draft new API
* Push reusable ScreensBaseImpl implementation
* Fix tests and stubs
* Update ScreensPage sample to work on mobile + show new APIs
* Reimplement Windows ScreensImpl, reuse existing screens in other places of backend, use Microsoft.Windows.CsWin32 for interop
* Make X11 project buildable, don't utilize new APIs yet
* Reimplement macOS Screens API, differenciate screens by CGDirectDisplayID
* Fix build
* Adjust breaking changes file (none affect users)
* Fix missing macOS Screen.DisplayName
* Add more tests + fix screen removal
* Add screens integration tests
* Use hash set with comparer when removing screens
* Make screenimpl safer on macOS as per review
* Replace UnmanagedCallersOnly usage with source generated EnumDisplayMonitors
* Remove unused dllimport
* Only implement GetHashCode and Equals on PlatformScreen subclass, without changing base Screen
* test: CommandParameter does not change between CanExecute and Execute
* feat: CommandParameter does not change between CanExecute and Execute
* test: update
Allow overriding the default behavior of item containers in styles or in `ItemContainerTheme`. To do this, use `SetCurrentValue` to set the properties, only if the properties are not already set (i.e. from a style). This also requires us to clear the current value when the container is cleared (styles won't be affected as `AvaloniaObject.ClearValue` only clears local or `SetCurrentValue` values).
- `MenuItem` is a `HeaderedSelectingItemsControl` not a `HeaderedItemsControl` so need to separate logic for that case when preparing items
- Added `HeaderTemplate` to `HeaderedSelectingItemsControl `
- Tweaked logic for selecting header templates: parent's `ItemTemplate` should be used if set (cross-checked with WPF)
- Update menu templates to bind to menu item's `HeaderTemplate`
Fixes#10626Fixes#10718
Applying styling in the constructor isn't a good idea as demonstrated by #8549..
Instead apply styling when showing a window, or if it's needed call `ApplyStyling` manually, e.g. in unit tests.
Fixes#8549
* [MenuItem] [Performance] Evaluate CanExecute on menu show and only if menu is visible
* [Revert] a change from another PR
* Update tests/Avalonia.Controls.UnitTests/MenuItemTests.cs
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* Update tests/Avalonia.Controls.UnitTests/MenuItemTests.cs
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* fix typo
* [MenuItem] fix IsEffectivelyEnabled and cover with tests
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
Added a new `IsEnabledCore` property to `InputElement` which is overridden in `Button` and `MenuItem` to override the `IsEffectivelyEnabled` state with the enabled state of the command.
Also add data validation of the `Command` property to `MenuItem` to make it behave the same as `Button` when `Command` is bound to a non-existent property.
Fixes#2501
I now understand how WPF's `IsEnabledCore` works, and it's not like this. Rename `IsEnabledCore` to `IsEffectivelyEnabled` so that we can add a new `IsEnabledCore` property which works like WPF's.
This also aligns with the existing `IsEffectivelyVisible` property.