ListBox `SelectionMode`=`Multiple` no events
See original GitHub issueListBox does not work properly when SelectionMode is set to Multiple.
Tested on Avalonia 0.9.2
Simple repro
type MainWindow() as this =
inherit Window()
do
let listBox = new ListBox()
listBox.SelectionMode <- SelectionMode.Multiple
listBox.Items <- [
"Item 1"
"Item 2"
"Item 3"
"Item 4"
]
listBox.SelectionChanged.Add(fun _ ->
// only fired if a single item is selected. does not fire
// for multiple selected items
printfn "selection changed event"
)
listBox.GetSubject(ListBox.SelectedItemsProperty).Add(fun args ->
// never fired when a selection changed
printfn "subscription 'SelectedItemsProperty'"
)
base.Content <- listBox
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
c# - WPF CheckedListBox SelectionMode="Multiple" not ...
I'm needing to get the selectedIndex and the checkedbox text. Everything works as needed until I change the listbox's SelectionMode to "Multiple ......
Read more >ListBox.SelectionMode Property (System.Windows.Forms)
The SelectionMode property enables you to determine how many items in the ListBox a user can select at one time and how the...
Read more >ListBox.SelectionMode Property (System.Web.UI. ...
Multiple specifies multiple items can be selected. The value of the SelectionMode property is stored in view state. Applies to. Product, Versions ...
Read more >Multiple" and OnSelectedIndexChanged in UI ...
If I have all three items selected in ASP's ListBox and I hold down Ctrl and click on one item to unselect it...
Read more >ListBox Multiple selection is not working in Mac with ...
I am using the listbox control and have SelectionMode="Multiple" and it works fine in window environment. When I open the page in Mac...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@FoggyFinder not exactly,
ListBox.SelectedItemsPropertysubscription also does not workThe current solution is better in scenarios where you transform the collection of selected items.