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

            currentLineHighlighterElement.ForegroundBrush = ResourceDictionaryUtilities.GetForegroundBrush(props);
            currentLineHighlighterElement.BackgroundBrush = ResourceDictionaryUtilities.GetBackgroundBrush(props);
        }
Exemple #2
0
        void UpdateBackground()
        {
            if (editorFormatMap == null)
            {
                return;
            }
            var props         = editorFormatMap.GetProperties(ThemeClassificationTypeNameKeys.GlyphMargin);
            var newBackground = ResourceDictionaryUtilities.GetBackgroundBrush(props, Brushes.Transparent);

            if (!BrushComparer.Equals(Background, newBackground))
            {
                Background = newBackground;
                // The images could depend on the background color, so recreate every icon
                if (childCanvases.Any(a => a.Children.Count > 0))
                {
                    Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(RefreshEverything));
                }
            }
        }
Exemple #3
0
        void UpdateBackground()
        {
            var bgProps = editorFormatMap.GetProperties(EditorFormatMapConstants.TextViewBackgroundId);

            Background = ResourceDictionaryUtilities.GetBackgroundBrush(bgProps, SystemColors.WindowBrush);
        }
Exemple #4
0
        Brush GetBackgroundBrush()
        {
            var props = editorFormatMap.GetProperties(IsActive ? ThemeClassificationTypeNameKeys.SelectedText : ThemeClassificationTypeNameKeys.InactiveSelectedText);

            return(ResourceDictionaryUtilities.GetBackgroundBrush(props, IsActive ? SystemColors.HighlightBrush : SystemColors.GrayTextBrush));
        }