|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Windows; |
|
|
|
using System.Windows; |
|
|
|
|
|
|
|
using System.Windows.Data; |
|
|
|
using System.Windows.Media; |
|
|
|
using System.Windows.Media; |
|
|
|
using System.Windows.Shapes; |
|
|
|
using System.Windows.Shapes; |
|
|
|
|
|
|
|
|
|
|
|
@ -19,18 +20,24 @@ namespace ICSharpCode.AvalonEdit.Editing |
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a vertical dotted line to separate the line numbers from the text view.
|
|
|
|
/// Creates a vertical dotted line to separate the line numbers from the text view.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public static UIElement Create() |
|
|
|
public static UIElement Create(TextEditor editor) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return new Line { |
|
|
|
Line line = new Line { |
|
|
|
X1 = 0, Y1 = 0, X2 = 0, Y2 = 1, |
|
|
|
X1 = 0, Y1 = 0, X2 = 0, Y2 = 1, |
|
|
|
StrokeDashArray = { 0, 2 }, |
|
|
|
StrokeDashArray = { 0, 2 }, |
|
|
|
Stretch = Stretch.Fill, |
|
|
|
Stretch = Stretch.Fill, |
|
|
|
Stroke = Brushes.Gray, |
|
|
|
|
|
|
|
StrokeThickness = 1, |
|
|
|
StrokeThickness = 1, |
|
|
|
StrokeDashCap = PenLineCap.Round, |
|
|
|
StrokeDashCap = PenLineCap.Round, |
|
|
|
Margin = new Thickness(2, 0, 2, 0), |
|
|
|
Margin = new Thickness(2, 0, 2, 0), |
|
|
|
Tag = tag |
|
|
|
Tag = tag |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
line.SetBinding( |
|
|
|
|
|
|
|
Line.StrokeProperty, |
|
|
|
|
|
|
|
new Binding("LineNumbersForeground") { Source = editor } |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return line; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
|