Class IgbThemeProvider
A theme provider component that uses Lit context to provide theme information
to descendant components.
This component allows you to scope a theme to a specific part of the page.
All library components within this provider will use the specified theme
instead of the global theme.
@remarks
When using the theme provider, it must be registered before any descendant components
that will consume the theme context. This ensures the context provider is available
when descendant components attempt to consume it.
import { defineComponents, IgcThemeProviderComponent, IgcButtonComponent } from 'igniteui-webcomponents';
// Register theme provider first, then descendant components
defineComponents(IgcThemeProviderComponent, IgcButtonComponent);
@example
Material Dark Button
Fluent Light Button
Inheritance
System.Object
IgbThemeProvider
Implements
System.IDisposable
Assembly: IgniteUI.Blazor.dll
Syntax
public class IgbThemeProvider : BaseRendererControl, RefSink, JsonSerializable, IDisposable
Constructors
IgbThemeProvider()
Declaration
public IgbThemeProvider()
Properties
DefaultEventBehavior
Declaration
protected override ControlEventBehavior DefaultEventBehavior { get; }
Property Value
Overrides
DirectRenderElementName
Declaration
protected override string DirectRenderElementName { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
SupportsVisualChildren
Declaration
protected override bool SupportsVisualChildren { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Theme
The theme to provide to descendant components.
@default 'bootstrap'
Declaration
public Theme Theme { get; set; }
Property Value
Type
Declaration
public override string Type { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
UseDirectRender
Declaration
protected override bool UseDirectRender { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Variant
The theme variant to provide to descendant components.
@default 'light'
Declaration
public ThemeVariant Variant { get; set; }
Property Value
Methods
EnsureModulesLoaded()
Declaration
protected override void EnsureModulesLoaded()
Overrides
FindByName(String)
Declaration
public override object FindByName(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Returns
| Type |
Description |
| System.Object |
|
Overrides
ResolveDisplay()
Declaration
protected override string ResolveDisplay()
Returns
| Type |
Description |
| System.String |
|
Overrides
SetNativeElement(Object)
Declaration
public void SetNativeElement(object element)
Parameters
| Type |
Name |
Description |
| System.Object |
element |
|
SetNativeElementAsync(Object)
Declaration
public Task SetNativeElementAsync(object element)
Parameters
| Type |
Name |
Description |
| System.Object |
element |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
System.IDisposable