示例#1
0
        protected override void OnRender(DrawingContext drawingContext)
        {
            drawingContext.DrawRectangle(SharedEditorConfiguration.GetEditorBrush(), null, new Rect(0, 0, ActualWidth, ActualHeight));

            if (linesView == null && foldingView == null)
            {
                SetupViews();
            }
        }
        protected override void OnRender(DrawingContext drawingContext)
        {
            drawingContext.DrawRectangle(SharedEditorConfiguration.GetEditorBrush(), null, new Rect(0, 0, ActualWidth, ActualHeight));

            if (textView == null && selectionView == null && caretView == null)
            {
                SetupViews();
                InitEvents();
                UpdateConfig();
            }
        }
示例#3
0
        public void Redraw(int num)
        {
            var fontColor  = SharedEditorConfiguration.GetLinesColumnFontColor();
            var typeface   = SharedEditorConfiguration.GetTypeface();
            var fontHeight = TextConfiguration.GetCharSize().Height;

            using (var drawingContext = RenderOpen()) {
                drawingContext.DrawText(
                    new FormattedText(num.ToString(), CultureInfo.CurrentCulture, FlowDirection.LeftToRight, typeface, fontHeight, fontColor),
                    new Point(0, fontHeight * (num - 1)));
            }
        }
示例#4
0
 public FoldingView()
 {
     bgBrush          = SharedEditorConfiguration.GetFoldingColumnBrush();
     foldingPositions = new Dictionary <FoldingPositionInfo, FoldingPositionInfo>();
     Margin           = new Thickness(SharedEditorConfiguration.GetLinesColumnWidth(), 0, 0, 0);
 }
示例#5
0
 protected override double GetWidth() => SharedEditorConfiguration.GetFoldingColumnWidth();
示例#6
0
 public LinesView()
 {
     bgBrush          = SharedEditorConfiguration.GetLinesColumnBrush();
     linesCount       = 1;
     initialRendering = true;
 }