Esempio n. 1
0
        private Icon GetTrayIconByDPI()
        {
            var scale = DpiHelper.GetCurrentScaleFactor().Vertical;

            if (!App.IsWin10)
            {
                return(scale > 1 ? Resources.app : Resources.app_16);
            }

            return(OSThemeHelper.SystemUsesDarkTheme()
                ? (scale > 1 ? Resources.app_white : Resources.app_white_16)
                : (scale > 1 ? Resources.app_black : Resources.app_black_16));
        }
Esempio n. 2
0
        private void AssignHighlightingManager(TextViewerPanel tvp, ContextObject context)
        {
            var isDark = (context.Theme == Themes.Dark) | OSThemeHelper.AppsUseDarkTheme() | false;

            tvp.HighlightingManager = isDark ? _hlmDark : _hlmLight;
        }