ThemePanelExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for building ThemePanelWidget.
csharp
public static class ThemePanelExtensionsInheritance
Object → ThemePanelExtensions
Methods
ThemePanel<TParent>(WidgetContext<TParent>, Func<Hex1bTheme, Hex1bTheme>, Func<WidgetContext<VStackWidget>, Hex1bWidget[]>)
Creates a ThemePanel with a VStack child that applies theme customizations.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.themeMutator(Func<Hex1bTheme, Hex1bTheme>): A function that receives a clone of the current theme and returns the theme to use. The theme is already cloned, so you can safely call Set() directly.builder(Func<VStackWidget>, Hex1bWidget[]>): A builder function that creates the VStack children.
Returns: ThemePanelWidget
A ThemePanelWidget containing a VStack.
csharp
public static ThemePanelWidget ThemePanel<TParent>(this WidgetContext<TParent> ctx, Func<Hex1bTheme, Hex1bTheme> themeMutator, Func<WidgetContext<VStackWidget>, Hex1bWidget[]> builder) where TParent : Hex1bWidgetThemePanel<TParent>(WidgetContext<TParent>, Func<Hex1bTheme, Hex1bTheme>, Hex1bWidget)
Creates a ThemePanel that applies theme customizations to a child widget tree. The theme mutator function receives the current theme and returns the theme to use.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.themeMutator(Func<Hex1bTheme, Hex1bTheme>): A function that receives a clone of the current theme and returns the theme to use. The theme is already cloned, so you can safely call Set() directly.child(Hex1bWidget): The child widget to render with the customized theme.
Returns: ThemePanelWidget
A ThemePanelWidget.
csharp
public static ThemePanelWidget ThemePanel<TParent>(this WidgetContext<TParent> ctx, Func<Hex1bTheme, Hex1bTheme> themeMutator, Hex1bWidget child) where TParent : Hex1bWidget