Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

[WPF] ListBox and ListView: add support to RowActivated event #490

Merged
merged 1 commit into from
Sep 10, 2016
Merged

[WPF] ListBox and ListView: add support to RowActivated event #490

merged 1 commit into from
Sep 10, 2016

Conversation

henriquemotaesteves
Copy link

On GTK, the RowActivated event of a ListBox is raised when the user performs a double-click on a row. To mimic this behavior on WPF, I used the MouseDoubleClick event of a System.Windows.Controls.ListBox.

References:

http://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Events#Double-Clicks_on_a_Row
http://docs.go-mono.com/?link=E%3aGtk.TreeView.RowActivated
https://msdn.microsoft.com/en-us/library/system.windows.controls.control.mousedoubleclick(v=vs.110).aspx

@henriquemotaesteves henriquemotaesteves changed the title [WPF] ListBox: add support to RowActivated event [WPF] ListBox and ListView: add support to RowActivated event Feb 13, 2015
@sevoku
Copy link
Member

sevoku commented Feb 13, 2015

I thought about exactly this way to implement this, but wanted to take a closer look and think about implementing this on the CellView side (handle cellviews clicks and notify listview).

Can this solution interfere with something, like multiselection? Can ListView.SelectedIndex point to an other row under some rare conditions?

(closes #286)

@sevoku sevoku added this to the v0.3 milestone Feb 13, 2015
@sevoku sevoku merged commit f495676 into mono:master Sep 10, 2016
sevoku added a commit that referenced this pull request Sep 10, 2016
…ated

[WPF] ListBox and ListView: add support to RowActivated event
@sevoku
Copy link
Member

sevoku commented Sep 10, 2016

I've tested this again and it seems to be ok to use SelectedIndex in this case. The TreeView is more tricky, I've added it here: baedc7a.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants