Yoh Deadfall
37e8890d27
CanExecute reevaluation on attaching to logical tree
5 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
Adir
7c952cfc5f
Changed Hotkey reset to detatch from logical tree (was visual tree)
6 years ago
Adir
ecba5f65f0
Reverted HotkeyManager.cs
Changed Button.cs to remove it's HotKey property when detaching from visual tree
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
bc079008d1
Remove usage of deprecated input APIs.
6 years ago
Steven Kirk
4a752c3f48
Get non-animated change information.
- Pass information for all property changes to `OnPropertyChangedCore`; whether they result in an effective value change or not
- Added `GetBaseValue` to get a value with a specified priority
- Change the signature of `OnPropertyChanged` again to take an `AvaloniaPropertyChangedEventArgs<T>`
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
b89305d708
Set pseudoclasses manually.
It makes creating new controls a _lot_ faster.
7 years ago
Steven Kirk
557898adfd
Move methods back to original order.
Moving them like this was confusing the diff.
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
a16e3bff7f
Added InitialPressMouseButton to PointerReleasedEventArgs that returns the button that caused the PointerPressed event
MouseButton is now deprecated with error, since people need to decide which behavior they want
7 years ago
Genadij Trimailov
cd90cf86e7
copy paste typo
7 years ago
Tridy
42dd06cf96
added IsCancel to Button
Like pressing Enter triggers a button that has the property IsDefault set to true, pressing Escape should work on the button that has IsCancel set to true.
7 years ago
Nikita Tsukanov
ec99f7d1a9
Initial scroll gesture implementation
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
7363f7140b
Don't leak subs to CanExecuteChanged in Button.
8 years ago
Dan Walmsley
e799543b94
fix menuitem command property.
8 years ago
Andrey Kunchev
91e678baf8
call canexecute before execute for button/menu command
8 years ago
Andrey Kunchev
a803e8bd7b
improve button click fixes #2148
8 years ago
Andrey Kunchev
81c274328b
fix tiny tiny nit
8 years ago
Andrey Kunchev
08d552de10
fix button click for deferedrenderer
8 years ago
Andrey Kunchev
ef158e3ec3
hittest when button is pressed
8 years ago
Andrey Kunchev
922917b299
fix pr nits
8 years ago
Andrey Kunchev
e1874b4a4c
fix for issue #2000 button with rendertransform don't fire click
8 years ago
Steven Kirk
576cc91573
Make Pseudoclass method typed.
8 years ago
Steven Kirk
272939464e
Need to press a button to click it!
Only raise a `Button` click event on pointer release when the button has been pressed first!
8 years ago
Matthijs ter Woord
981cf5a2f1
Now we have .IsPressed property, have the PseudoClass method handle that for us.
9 years ago
Eli Arbel
106146460d
Add RepeatButton
9 years ago
Matthijs ter Woord
bfd7de2427
IsPressed property should be a StyledProperty, otherwise stackoverflow occurs
9 years ago
Matthijs ter Woord
4f902c4552
Add IsPressed property on Button
9 years ago
Steven Kirk
3bee9e5557
Only respond to left click in Button.
Fixes #854 .
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
Steven Kirk
4d30de7c09
Only click when pointer is over the button.
Previously a button click was carried out when `:pointerover` was set, but because the button captures mouse input on mouse down, this is always true while the mouse is held. Check that the pointer was released within the bounds of the control.
Fixes #938
9 years ago
Nikita Tsukanov
0b756d0b8a
More null checks
9 years ago
Jeremy Koritzinsky
aacb052253
Made changes requested by @grokys .
9 years ago
Wiesław Šoltés
a26c261aad
Fixed OnPointerReleased parameter type
10 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
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
3e3134217c
Fixed name of PointerPressedEventArgs.
11 years ago
Steven Kirk
5489487131
Make LayoutManager global.
Also made a few other changes along the way:
- Add MaxClientSize to ILayoutRoot
- Store IRenderRoot in Visual and use that to calculate
IsAttachedToVisualTree
- Make Affects* methods take multiple properties
11 years ago
Steven Kirk
d25e057ccc
More WIP refactoring properties.
Compiles now but lots of tests failing.
11 years ago
Steven Kirk
db1e20acc8
Only allow pseudoclasses to be set by control.
Limit adding/removing pseudoclasses to IPseudoClasses interface.
11 years ago
Steven Kirk
67835cc09b
Applied a bunch of resharper suggestions.
11 years ago
Steven Kirk
9eb54f59d2
Fixed name scopes.
Controls were being registered with the nearest name scope on the visual
tree, whereas they should be registered by traversing the logical tree.
11 years ago
Steven Kirk
16c2242757
Implemented NameScopes
Some tests still failing as controls are only registered with name scope
when attached to a rooted visual tree. Need to work around this by
explicitly registering controls when applying template.
11 years ago
Steven Kirk
24e18d0236
Documentation.
11 years ago