From 25ed4722ae6d287a9ab95d386b73198a2e058cdc Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 2 Nov 2025 09:12:37 +0100 Subject: [PATCH] Fix binding failures due to missing Background property on the base type. --- ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs | 8 ++++++++ ILSpy/ViewModels/CompareViewModel.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs b/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs index 8a8619080..01b505736 100644 --- a/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs +++ b/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs @@ -134,6 +134,14 @@ namespace ICSharpCode.ILSpyX.TreeView get { return null; } } + public virtual object? Background { + get { return null; } + } + + public virtual object? Foreground { + get { return null; } + } + public int Level { get { return Parent != null ? Parent.Level + 1 : 0; } } diff --git a/ILSpy/ViewModels/CompareViewModel.cs b/ILSpy/ViewModels/CompareViewModel.cs index 29c4620c3..163650ce8 100644 --- a/ILSpy/ViewModels/CompareViewModel.cs +++ b/ILSpy/ViewModels/CompareViewModel.cs @@ -702,7 +702,7 @@ namespace ICSharpCode.ILSpy.ViewModels return compareViewModel.ShowIdentical || entry.RecursiveKind != DiffKind.None ? FilterResult.Match : FilterResult.Hidden; } - public Brush Background { + public override object? Background { get { switch (entry.RecursiveKind) {