Exemple #1
0
        public void SetTheme(string cname)
        {
            var paletteHelper = new MaterialDesignThemes.Wpf.PaletteHelper();
            SwatchesProvider swatchesProvider = new SwatchesProvider();
            Swatch           color            = swatchesProvider.Swatches.FirstOrDefault(a => a.Name == cname);

            paletteHelper.ReplacePrimaryColor(color);
        }
Exemple #2
0
        public static TextBlock ResetColor(TextBlock textBlock)
        {
            var palette = new MaterialDesignThemes.Wpf.PaletteHelper().QueryPalette();
            var hue     = palette.PrimarySwatch.PrimaryHues.ToArray()[palette.PrimaryDarkHueIndex];

            textBlock.Foreground = new SolidColorBrush(hue.Color);

            return(textBlock);
        }
Exemple #3
0
        public void SetTheme(Color c)
        {
            var paletteHelper = new MaterialDesignThemes.Wpf.PaletteHelper();

            paletteHelper.ChangePrimaryColor(c);
        }