Luis von der Eltz
f207a6a61e
Fix issue with MenuItem.Click not called when the item is not embdded into a Menu
6 years ago
Yoh Deadfall
faf9aa1f96
CanExecute reevaluation on parameter change
6 years ago
Adir
41c4630bbb
Changed if statements to have braces
Moved comments above if
6 years ago
Giuseppe Lippolis
ef38567547
Implemented ICommandSource
6 years ago
Adir
3c302f72f2
Added docs explaining why need to change Hotkey on attach/detach from logical tree
Added the same logic to MenuItem.cs
Reverted auto indentation in Button.cs
6 years ago
Dariusz Komosiński
858b78b59e
Menu interaction handler fixes.
6 years ago
Steven Kirk
58c333b6f1
Added PseudoClassesAttribute.
And apply it to our controls. Can be used by designers to add auto-completion support for pseudoclasses.
6 years ago
Steven Kirk
db67fa2cf6
Tweak the MenuItem Grid hack.
To try and fix menu layout in the fluent theme.
6 years ago
Steven Kirk
922c46bbc4
Dispose the grid hack in the correct place.
The grid hack was initiated when attached to the visual tree but the dispose had been placed in `OnDetachedFromLogicalTree` by mistake. Place it in `OnDetachedFromVisualTree`.
6 years ago
Steven Kirk
d242e1b5dd
Revert "Fix shared size group for fluent sub menu"
This reverts commit 85c09761ba .
6 years ago
Benedikt Schroeder
85c09761ba
Fix shared size group for fluent sub menu
6 years ago
Steven Kirk
dd563805cd
Nullable enable menu-related classes.
6 years ago
Max Katz
0d685ac7d6
Add :pressed :open :icon pseudoclasses to MenuItem
6 years ago
Steven Kirk
2fcde9e34d
Use OnApplyTemplate instead of OnTemplateApplied.
- More similar to WPF API
- Less bug-prone (see #3744 )
`OnTemplateApplied` still exists, but is deprecated and does nothing.
6 years ago
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.
7 years ago
Steven Kirk
df3fd0472e
Detach grid hack on logical tree detachment.
Doing it on visual tree detachment caused the menu to bug out when showing a submenu more than once.
7 years ago
Steven Kirk
022294ec7a
MenuItem.InputGestureText -> InputGesture
Changed `MenuItem`'s `string InputGestureText` property to `KeyGesture InputGesture` and gave it a value converter in the default template, because the string representation of a key gesture depends on platform, and putting platform-specific behavior into `ToString` isn't a good idea.
7 years ago
Steven Kirk
f5c9539c7a
Use correct property type.
7 years ago
Steven Kirk
8a0ccea273
Add MenuItem.InputGestureText.
7 years ago
Steven Kirk
6be3acb46c
Make ValueStore typed.
Major refactor of the Avalonia core to make the styled property store typed.
7 years ago
Nikita Tsukanov
1b5f3b6cc8
Renamed GetPointerPoint to GetCurrentPoint to match UWP
7 years ago
Dariusz Komosinski
a2c6bc1b7c
Remove usage of AddClassHandler that returns new lambda per invocation.
7 years ago
Nikita Tsukanov
0bad390dac
Added PointerUpdateKind and replaced InputModifiers with KeyModifiers
7 years ago
Nikita Tsukanov
f9561260a3
IPopupImpl is now optional advanced feature
7 years ago
Nikita Tsukanov
b387c38c84
Implemented simple inertial scroll
7 years ago
Nikita Tsukanov
f556db57b4
Refactor pointer events to support touch events
7 years ago
Steven Kirk
38d68865fd
Correctly handle command.CanExecute state.
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
7 years ago
Steven Kirk
6334314a90
Fix typo in calling base methods.
8 years ago
Steven Kirk
a48efd6b55
Don't leak subs to CanExecuteChanged in MenuItem.
8 years ago
Dan Walmsley
9edbd199e9
formatting.
8 years ago
Dan Walmsley
e799543b94
fix menuitem command property.
8 years ago
José Pedro
0fce33e43e
XML comment fixes.
8 years ago
Andrey Kunchev
91e678baf8
call canexecute before execute for button/menu command
8 years ago
Steven Kirk
f55b556b1c
Make separator MenuItem non-focusable.
8 years ago
Steven Kirk
b449003958
Allow MenuItems to be separators.
If `MenuItem.Header == "-"` then apply the `:separator` pseudoclass to the `MenuItem` and display it as a separator.
8 years ago
Steven Kirk
ca34bf9aba
Don't assume Items are MenuItems.
They may be created via `DataTemplate`s.
8 years ago
Dan Walmsley
47676e6be2
fix null reference exception.
8 years ago
Steven Kirk
1293e9af8d
Implemented Menu interactions.
8 years ago
Steven Kirk
2584f4bb18
Removed directional navigation code.
8 years ago
José Pedro
a89f9486f1
Implemented correct behavior for Command.CanExecute on MenuItem.
9 years ago
Dmitriy Arndt
b0d8ff69ea
Fixed: MenuItem with sub-items is not closed when other menu item without sub-items is selected #226
9 years ago
Steven Kirk
85e40b9c0b
Set e.Handled on command execution.
Otherwise the `Click` event bubbles upwards causing #566 .
Fixes #566
9 years ago
Jeremy Koritzinsky
64e0905d61
Buttons are disabled when there is a null in the binding chain for Command.
Fixes #846 .
10 years ago
Steven Kirk
5ce57ad029
Fix menu separators.
10 years ago
Steven Kirk
5346f20d81
Use correct ItemContainerGenerator for menus.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
fe1132bc4d
Make MenuItem.Icon a logical child of MenuItem.
So that it can be styled.
11 years ago
Steven Kirk
3e3134217c
Fixed name of PointerPressedEventArgs.
11 years ago
Steven Kirk
a03dad9bab
Removed a bunch of unused members/classes.
11 years ago
Steven Kirk
1202eaa876
Updated PerspexProperties to new classes
i.e. AttachedProperty, DirectProperty or StyledProperty.
11 years ago