-
Notifications
You must be signed in to change notification settings - Fork 81
docs(treeview):OnDoubleClick and OnContextMenu events #499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
641f6b9
docs(treeview):OnDoubleClick and OnContextMenu events
ntacheva 7e4de32
Update components/contextmenu/integration.md
ntacheva bf1a21a
Update components/treeview/events.md
ntacheva f918168
Update knowledge-base/contextmenu-treeview-items.md
ntacheva 12a1889
Update components/treeview/events.md
ntacheva 81b0ba6
docs(treeview):improve event handler names
ntacheva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #rowclick-args | ||
|
|
||
| The event arguments expose an `EventArgs` property. It maps to `MouseEventArgs` or `KeyboardEventArgs` depending on the user's action (clicking the row with the mouse/tapping it on a touch device, or pressing `Enter` when the row is focused). You can use the event arguments to determine the keyboard key or the position of the mouse cursor when the user took an action. | ||
|
|
||
| #end | ||
|
|
||
| #rowclick-args-example | ||
|
|
||
| if (args.EventArgs is KeyboardEventArgs keyboardEventArgs) | ||
| { | ||
| Console.WriteLine($"The user clicked {keyboardEventArgs.Key} on row {model.Name}"); | ||
| } | ||
| else if (args.EventArgs is MouseEventArgs mouseEventArgs) | ||
| { | ||
| Console.WriteLine($"The user clicked {mouseEventArgs.ClientX} {mouseEventArgs.ClientY} on row {model.Name}"); | ||
| } | ||
|
|
||
| #end | ||
|
|
||
| #rowclick-args-treeview-example | ||
|
|
||
| if (args.EventArgs is KeyboardEventArgs keyboardEventArgs) | ||
| { | ||
| Console.WriteLine($"The user clicked {keyboardEventArgs.Key} on node {item.Text}"); | ||
| } | ||
| else if (args.EventArgs is MouseEventArgs mouseEventArgs) | ||
| { | ||
| Console.WriteLine($"The user clicked {mouseEventArgs.ClientX} {mouseEventArgs.ClientY} on node {item.Text}"); | ||
| } | ||
|
|
||
| #end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.