public static void SetBaseTheme(this IExtendedTheme theme, IExtendedBaseTheme baseTheme)
        {
            // call implementation of MaterialDesignThemes
            theme.SetBaseTheme((IBaseTheme)baseTheme);

            // set extended properties of the theme
            theme.NavigationItemIcon      = baseTheme.MaterialDesignNavigationItemIcon;
            theme.NavigationItemText      = baseTheme.MaterialDesignNavigationItemText;
            theme.NavigationItemSubheader = baseTheme.MaterialDesignNavigationItemSubheader;
            theme.StepperInactiveStep     = baseTheme.MaterialDesignStepperInactiveStep;
            theme.StepperActiveStep       = baseTheme.MaterialDesignStepperActiveStep;
            theme.StepperSeparator        = baseTheme.MaterialDesignStepperSeparator;
        }
Example #2
0
        public static ExtendedTheme Create(IExtendedBaseTheme baseTheme, Color primary, Color accent)
        {
            if (baseTheme == null)
            {
                throw new ArgumentNullException(nameof(baseTheme));
            }

            ExtendedTheme theme = new ExtendedTheme();

            theme.SetBaseTheme(baseTheme);
            theme.SetPrimaryColor(primary);
            theme.SetSecondaryColor(accent);

            return(theme);
        }