Skip to content

Commit

Permalink
tree visual update fix
Browse files Browse the repository at this point in the history
- using Dispatcher fixes the async tree creation
  • Loading branch information
dnenov committed Oct 3, 2023
1 parent a8fb2de commit 1cceb9e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyC

private void Root_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
UpdateCustomTreeView(sender);
Dispatcher.BeginInvoke((Action)(() =>
{
UpdateCustomTreeView(sender);
}));
}

public CustomBrowserControl()
Expand Down

0 comments on commit 1cceb9e

Please sign in to comment.