microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Proposal: Treeview SelectionMode Multiple select only parent

Open mani009 opened this issue 6 years ago • 4 comments

Hello,

it would be great to select only the parent node.

As far as i can see in multiple mode i can`t only select parent node.

mani009 avatar Mar 30 '19 09:03 mani009

@mani009 - thank you for filing this feature request. Could you please elaborate on your scenario for needing to select the parent without selecting it's child nodes by default? We could provide you with some solutions accordingly once we complete our current roadmap for WinUI3.0: https://github.com/microsoft/microsoft-ui-xaml/issues/717

It captures the investments we're currently actively working on. Please do review it and provide us with your feedback!

predavid-zz avatar May 29 '19 18:05 predavid-zz

@predavid Hy predavid thank`s for your response,

I use the treeview for example for an preselection for the print preview to select different documents to print. It would be nice the user can only select the parent Treeviewnode. Or another possibility would be great if the Treeview has the SelectionMode Extended as the UserControl Listview to select exactly the documents are needed.

Great Work!!!

mani009 avatar Jun 01 '19 09:06 mani009

We should also be able to select parent only, without children.
Currently, when SelectionMode is set to Multiple, selecting a parent selects all its children, which is super frustrating as there's no way to disable that behavior.

weitzhandler avatar Feb 29 '24 14:02 weitzhandler

Hello, I’m currently facing this issue as well, and it’s indeed very frustrating.

Here is a concrete scenario where selecting only the parent node would be extremely useful:

We are developing an application that lets users choose which folders to sync. The selection UI is a TreeView in Multiple selection mode. Only folders are displayed:

Image

For example, if the user wants to sync the folder “Common documents” and its files but not any of its subfolders, they will naturally unselect all the subfolders. However, as soon as all children folders are unselected, the parent folder is automatically unselected as well, even though the user explicitly wants the parent to remain selected.

In this context, selecting a parent independently of its children is essential. The current behavior forces a selection cascade that doesn’t always match the user’s intent and makes this UX impossible to achieve.

A way to allow selecting only the parent node, without automatically selecting or deselecting its children, would solve this problem and make the control much more flexible for real-world use cases.

FYI: Here is how it currently look like with the QT framework:

Image

Thanks for considering this improvement!

herve-er avatar Nov 14 '25 14:11 herve-er