Επεξεργασία

Κοινή χρήση μέσω


Theming

Provides the API for platform-provided modern theming

Available for

Model-driven and canvas apps

Syntax

context.fluentDesignLanguage

Properties

tokenTheme

Fluent v9 theme tokens provided by the platform.

Type: Theme

typographyTokens

Fluent v9 typography tokens provided by the platform.

Type: TypographyStyles

brand

Fluent v9 BrandVariants based on which Fluent v9 theme was generated.

Type: BrandVariants

isDarkTheme

Indicates whether the current theme is dark or not.

Type: boolean

Example

const fluentDesignLanguage = props.context.fluentDesignLanguage;

return (
  <FluentProvider theme={props.theme}>
    <Label weight="semibold">{"Theming provided by the control."}</Label>
  </FluentProvider>
);

Sample controls

Modern Theming API control

Use modern themes in canvas apps (preview)
Power Apps component framework API reference
Power Apps component framework overview