Skip to content

Commit

Permalink
Merge pull request #405 from AvaloniaUI/maxkatz6-patch-1
Browse files Browse the repository at this point in the history
Use GetBindingObservable instead of `new Binding`
  • Loading branch information
maxkatz6 authored Mar 19, 2024
2 parents c805978 + be2a693 commit adbe72b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AvaloniaEdit/TextEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ private static void OnShowLineNumbersChanged(AvaloniaPropertyChangedEventArgs e)
var line = (Line)DottedLineMargin.Create();
leftMargins.Insert(0, lineNumbers);
leftMargins.Insert(1, line);
var lineNumbersForeground = new Binding("LineNumbersForeground") { Source = editor };
var lineNumbersForeground = editor.GetBindingObservable(LineNumbersForegroundProperty);
line.Bind(Shape.StrokeProperty, lineNumbersForeground);
lineNumbers.Bind(ForegroundProperty, lineNumbersForeground);
}
Expand Down

0 comments on commit adbe72b

Please sign in to comment.