Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

No reaction on expanding/collapsing item #196

Open

Description

@ndikiy

I have found an issue related to refreshing tree when item is to be expanded or collapsed initiated from VM layer. Using your demo, particularly Drag/drop tab of your demo, I have added mouse double-click handler to the tree where I try to toggle corresponding item expanded state. So, this handler is working but there is no reaction on changing item expanded state at the View layer until I resized the window so that item goes out of the view and back to the view.

Video of how to reproduce is attached

2023-07-25_10h24_57.mp4

Activity

  1. ndikiy commented on Jul 25, 2023

    @ndikiy
    Author

    Here is the code of mentioned handler:

            private void DragDrop_OnPointerPressed(object? sender, PointerPressedEventArgs e)
            {
                if (e.ClickCount != 2)
                    return;
    
                var row = (e.Source as Control)?.FindAncestorOfType<TreeDataGridRow>();
    
                if (row?.DataContext is DragDropItem item)
                    item.IsExpanded = !item.IsExpanded;
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions