Пример #1
0
 /// <inheritdoc/>
 protected override void SetHtmlViewBackgroundColor(IHtmlView htmlView)
 {
     if (_viewModel != null)
     {
         htmlView.SetBackgroundColor(ColorExtensions.HexToColor(_viewModel.BackgroundColorHex));
     }
 }
Пример #2
0
        /// <summary>
        /// Sets the default background color of the webview, this is the color shown while loading
        /// an HTML page or when the css background color is transparent. This method is called as
        /// early as possible, to avoid the white flicker when using dark themes, which is visible
        /// until the html page has finished loading.
        /// </summary>
        /// <param name="htmlView">The interface to the webview.</param>
        protected virtual void SetHtmlViewBackgroundColor(IHtmlView htmlView)
        {
            IThemeService themeService           = Ioc.GetOrCreate <IThemeService>();
            Color         defaultBackgroundColor = themeService.DarkMode
                ? Color.FromArgb(255, 18, 18, 18)
                : Color.FromArgb(255, 240, 240, 240);

            htmlView.SetBackgroundColor(defaultBackgroundColor);
        }
        /// <inheritdoc/>
        protected override void SetHtmlViewBackgroundColor(IHtmlView htmlView)
        {
            IThemeService themeService = Ioc.GetOrCreate <IThemeService>();

            htmlView.SetBackgroundColor(ColorExtensions.HexToColor(themeService.SelectedTheme.ImageTint));
        }
 /// <inheritdoc/>
 protected override void SetHtmlViewBackgroundColor(IHtmlView htmlView)
 {
     htmlView.SetBackgroundColor(ColorExtensions.HexToColor("#323232"));
 }