Exemplo n.º 1
0
        void UpdateLineElementBrushes()
        {
            var props = editorFormatMap.GetProperties(isActive ? ThemeClassificationTypeNameKeys.CurrentLine : ThemeClassificationTypeNameKeys.CurrentLineNoFocus);

            currentLineHighlighterElement.ForegroundBrush = ResourceDictionaryUtilities.GetForegroundBrush(props);
            currentLineHighlighterElement.BackgroundBrush = ResourceDictionaryUtilities.GetBackgroundBrush(props);
        }
Exemplo n.º 2
0
        void UpdateLineSeparatorBrush()
        {
            if (editorFormatMap == null)
            {
                return;
            }
            var props = editorFormatMap.GetProperties(ThemeClassificationTypeNameKeys.LineSeparator);
            var brush = ResourceDictionaryUtilities.GetForegroundBrush(props);

            if (brush == null)
            {
                brush = new SolidColorBrush(Color.FromRgb(0xA5, 0xA5, 0xA5));
            }
            if (brush.CanFreeze)
            {
                brush.Freeze();
            }
            if (!BrushComparer.Equals(lineSeparatorBrush, brush))
            {
                lineSeparatorBrush = brush;
                UpdateLineSeparatorElementsForeground();
            }
        }