menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support
Class StaticThemeResourceExtension - MAUI-ToolKit API Reference | Syncfusion

    Show / Hide Table of Contents

    Class StaticThemeResourceExtension

    Static Theme Resource Extension is a Markup Extension for simple key mapping in resource components.

    Inheritance
    System.Object
    StaticThemeResourceExtension
    Implements
    Microsoft.Maui.Controls.Xaml.IMarkupExtension
    Namespace: Syncfusion.Maui.Toolkit.Themes
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class StaticThemeResourceExtension : Object, IMarkupExtension
    Examples

    The following example shows how to map a key with another key.

    • XAML
     <local:StaticThemeResource x:Key="BadgeSettingsBackground" ResourceKey="SyncfusionPrimaryLightColor"/>

    Constructors

    StaticThemeResourceExtension()

    Declaration
    public StaticThemeResourceExtension()

    Properties

    ResourceKey

    Gets or sets the Resource Key value of the Markup Extension. This Resource Key is used to get the extended key's object.

    Declaration
    public string ResourceKey { get; set; }
    Property Value
    Type
    System.String

    Methods

    ProvideValue(IServiceProvider)

    Returns the object created for Resource Key from the Resource Dictionary. If the Resource Key is not found in the Resource Dictionary, an exception will be thrown.

    Declaration
    public object ProvideValue(IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    System.IServiceProvider serviceProvider
    Returns
    Type
    System.Object

    Implements

    Microsoft.Maui.Controls.Xaml.IMarkupExtension
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved