From e574bc24c07443e85f2468e6d5e9057e47b02c50 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Jul 2025 15:22:09 +0200 Subject: [PATCH] Add ExpandAllCommand --- ILSpy/ViewModels/CompareViewModel.cs | 10 ++++++++++ ILSpy/Views/CompareView.xaml | 5 +---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ILSpy/ViewModels/CompareViewModel.cs b/ILSpy/ViewModels/CompareViewModel.cs index 3dc2fc53f..92a54673d 100644 --- a/ILSpy/ViewModels/CompareViewModel.cs +++ b/ILSpy/ViewModels/CompareViewModel.cs @@ -68,6 +68,7 @@ namespace ICSharpCode.ILSpy.ViewModels this.root = new ComparisonEntryTreeNode(MergeTrees(leftTree.Item2, rightTree.Item2), this); this.SwapAssembliesCommand = new DelegateCommand(OnSwapAssemblies); + this.ExpandAllCommand = new DelegateCommand(OnExpandAll); this.PropertyChanged += CompareViewModel_PropertyChanged; } @@ -150,6 +151,7 @@ namespace ICSharpCode.ILSpy.ViewModels } public ICommand SwapAssembliesCommand { get; set; } + public ICommand ExpandAllCommand { get; set; } void OnSwapAssemblies() { @@ -160,6 +162,14 @@ namespace ICSharpCode.ILSpy.ViewModels OnPropertyChanged(nameof(RightAssembly)); } + public void OnExpandAll() + { + foreach (var node in RootEntry.DescendantsAndSelf()) + { + node.IsExpanded = true; + } + } + Entry MergeTrees(Entry a, Entry b) { var m = new Entry() { diff --git a/ILSpy/Views/CompareView.xaml b/ILSpy/Views/CompareView.xaml index ab9c35005..6279a8de6 100644 --- a/ILSpy/Views/CompareView.xaml +++ b/ILSpy/Views/CompareView.xaml @@ -13,12 +13,9 @@ -