-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Establish a single point in the Toolkit where a KryptonCustomPalette is assigned. #1623
Comments
Added to list |
No, this hs nothing todo with 2021 |
This method in ThemeManager raises some questions.
I'd like to add an ApplyTheme method for this to the method group and rewrite this a bit. /// <summary>
/// Loads the custom theme.
/// </summary>
/// <param name="palette">The palette.</param>
/// <param name="manager">The manager.</param>
/// <param name="themeFile">A custom theme file.</param>
/// <param name="silent">if set to <c>true</c> [silent].</param>
public static void LoadCustomTheme(KryptonCustomPaletteBase palette, KryptonManager manager, string themeFile = "", bool silent = false)
{
try
{
// Declare new instances (no need for locking if these are local to the method)
palette = new KryptonCustomPaletteBase();
manager = new KryptonManager();
// TODO: Add silent option
if (silent)
{
if (themeFile is not ("" and ""))
{
palette.Import(themeFile, silent);
}
}
else
{
palette.Import();
}
// Set manager
manager.GlobalCustomPalette = palette;
ApplyTheme(PaletteMode.Custom, manager);
}
catch (Exception exc)
{
KryptonExceptionHandler.CaptureException(exc,
showStackTrace: GlobalStaticValues.DEFAULT_USE_STACK_TRACE);
}
} |
Go ahead, it'll likely not work when the bigger changes are implemented |
Is your feature request related to a problem? Please describe.
At the moment Theme Selector Controls have a property to set the Custom theme and it can also be done through the
ThemeManager
andKryptonManager
. If there are more locations where this can be done than those should be addressed as well.If there are other points where this can occur, those should be named here.
Describe the solution you'd like
Consolidate this to a single point in the Toolkit where a custom theme will be assigned.
Describe alternatives you've considered
N/A
Approach
The text was updated successfully, but these errors were encountered: