Microsoft-ui-xaml: Proposal: Add "ClearAll" method to TreeView control

Created on 3 Nov 2020  路  3Comments  路  Source: microsoft/microsoft-ui-xaml

This method would DEselect all nodes in the tree -- the analog opposite of the existing SelectAll method.

Currently, clearing all checked nodes is unintuitive. Creating a straightforward method that matches the simplicity of the SelectAll method would reduce developer friction, particularly for those new to the control.

area-TreeView feature proposal team-Controls

Most helpful comment

Hmm, I see... I think it probably makes sense to have a clear all if there is a SelectAll as well. @predavid-zz

All 3 comments

There is the SelectedNodes and a selectedItems property on treeview, you can just call clear on those collections right?

@StephenLPeters Yes...but it took a bloody long time to figure that out! Given there are matching ExpandAll/CollapseAll methods, it makes intuitive sense to add a ClearAll method to the existing SelectAll, even if it's just a wrapper over SelectedNodes.Clear().

Hmm, I see... I think it probably makes sense to have a clear all if there is a SelectAll as well. @predavid-zz

Was this page helpful?
0 / 5 - 0 ratings