You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using `resources` to style specific aspects of a control
276
277
```jsx
277
-
<Button content="Hello with style!" resources={{
278
+
<Button
279
+
content="Hello with style!"
280
+
resources={{
278
281
ButtonForeground:"#00fff1",
279
282
ButtonForegroundPressed:"#2090ff",
280
-
}} />
283
+
}}
284
+
/>
285
+
```
286
+
287
+
Alternatively, use `styleKey` to leverage system theme styles.
288
+
```jsx
289
+
<Button
290
+
content="Hello with accent style!"
291
+
styleKey="AccentButtonStyle"
292
+
/>
281
293
```
294
+
> Note: `"AccentButtonStyle"` used in this example [is defined here](https://github.com/microsoft/microsoft-ui-xaml/blob/9052972906c8a0a1b6cb5d5c61b27d6d27cd7f11/dev/CommonStyles/Button_themeresources.xaml#L239). Controls will have their supported `styleKey`s defined in associated *_themeresources.xaml files like the one linked.
0 commit comments