pnl toggles group 'is_expanded' on double click

This commit is contained in:
John Colvin committed 2019-09-15 20:05:15 -05:00
1 parent c509669de9
commit 657973c2d4
1 file changed
+7 -1
@@ -346,7 +346,13 @@ namespace bts.shell.pnl {
void _on_group_item_mouse_down(object sender, MouseButtonEventArgs e) {
if (!e.Handled && sender is FrameworkElement el && el.DataContext is PNLRowCollectionViewGroup group) {
group.is_all_selected = !group.is_all_selected.GetValueOrDefault();
if (e.ClickCount == 2) {
group.is_expanded = !group.is_expanded;
} else if (el.try_find_ancestor_of_type(out DIYGrid grid) && grid.SelectionMode != SelectionMode.Single) {
group.is_all_selected = !group.is_all_selected.GetValueOrDefault();
} else {
return;
}
e.Handled = true;
}
}