Is it possible to set the ListView's SelectionMode in the MasterDetailsView?
Not currently with the provided template (though it's a named element, so you could grab the ListView and modify it's properties).
What's your scenario for this? Would you intend that the details provides some sort of summary and commands for the multiple items selected?
@michael-hawker The scenario would be something like what you see in any mail applications, that you can delete or modify multiple list view items.
Maybe its time for #1187
I can see a use case for this but there's more to it than just adding a SelectionMode property. You would also need to expose a new MultiSelectionContent and the SelectedItems. We can't expose SelectedItems through simple binding like all of the other ListView properties that are exposed. I've always said that we don't want to expose anything above a Selector because that's really all the MasterDetailsView is (we just can't inherit from it).
I'd like to see a User Voice request for this to see how many developers need it.
In the meantime, making it work for your use case is probably easily enough done through a custom style and some value converters or view states to swap out the details view when SelectedItems.Count > 1
@skendrot Yeah, I know. I solved this in my application by copying the source for the control itself and planning to maintain it with updates.
Feel free to close this issue if you don't find it relevant.
@skendrot That sounded rude when I read it back after posting it. Thanks for your help!
I'm thinking you don't need the source at all. If you restyle the control in order to set the SelectionMode, add a new panel for multi selection content and a CompareStateTrigger should do it.
@skendrot would filing a WinUI request for making Selector unsealed make sense?
@skendrot How do I restyle the control?
Nevermind, I managed to figure it out.
Seems like there is no uservoice entry created.
Closing this issue as seems like it worked out 馃殌
Most helpful comment
I'm thinking you don't need the source at all. If you restyle the control in order to set the SelectionMode, add a new panel for multi selection content and a CompareStateTrigger should do it.