通过


主题

为平台提供的新式主题设置提供 API

适用于

模型驱动和画布应用

Syntax

context.fluentDesignLanguage

属性

tokenTheme

平台提供的 Fluent v9 主题令牌。

类型主题

typographyTokens

平台提供的 Fluent v9 版式令牌。

类型版式

品牌

基于生成 Fluent v9 主题的 Fluent v9 BrandVariants。

类型BrandVariants

isDarkTheme

指示当前主题是否为深色。

类型boolean

Example

const fluentDesignLanguage = props.context.fluentDesignLanguage;

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

示例控件

新式主题 API 控件

在画布应用中使用新式主题(预览版)
Power Apps 组件框架 API 参考
Power Apps 组件框架概述