Skip to content

Commit f0d33eb

Browse files
committed
Instantiate using the concrete type SimpleHighlightingBrush
The type `HighlightingBrush` is abstract and cannot be instantiated. `SimpleHighlightingBrush` is what we want.
1 parent b779de9 commit f0d33eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ICSharpCode.AvalonEdit/Highlighting/HighlightingColor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ protected HighlightingColor(SerializationInfo info, StreamingContext context)
196196
this.Underline = info.GetBoolean("Underline");
197197
if (info.GetBoolean("HasStrikethrough"))
198198
this.Strikethrough = info.GetBoolean("Strikethrough");
199-
this.Foreground = (HighlightingBrush)info.GetValue("Foreground", typeof(HighlightingBrush));
200-
this.Background = (HighlightingBrush)info.GetValue("Background", typeof(HighlightingBrush));
199+
this.Foreground = (HighlightingBrush)info.GetValue("Foreground", typeof(SimpleHighlightingBrush));
200+
this.Background = (HighlightingBrush)info.GetValue("Background", typeof(SimpleHighlightingBrush));
201201
if (info.GetBoolean("HasFamily"))
202202
this.FontFamily = new FontFamily(info.GetString("Family"));
203203
if (info.GetBoolean("HasSize"))

0 commit comments

Comments
 (0)