Skip to content

Commit 81011a2

Browse files
niels9001jwmsft
andauthored
[Develop/UI] (#6337)
Co-authored-by: Jim Walker <[email protected]>
1 parent c5e7b79 commit 81011a2

16 files changed

Lines changed: 334 additions & 496 deletions

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "hub/apps/windows-app-sdk/system-backdrop-controller.md",
5+
"redirect_url": "/windows/apps/develop/ui/system-backdrops",
6+
"redirect_document_id": true
7+
},
38
{
49
"source_path": "hub/apps/winui/winui3/testing/index.md",
510
"redirect_url": "/windows/apps/develop/testing/",

hub/apps/design/layout/boxpanel-example-custom-panel.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Learn to write code for a custom Panel class, implementing ArrangeO
33
MS-HAID: dev\_ctrl\_layout\_txt.boxpanel\_example\_custom\_panel
44
MSHAttr: PreferredLib:/library/windows/apps
55
Search.Product: eADQiWindows 10XVcnh
6-
title: BoxPanel, an example custom panel (Windows apps)
6+
title: "Tutorial: Create a custom panel"
77
ms.assetid: 981999DB-81B1-4B9C-A786-3025B62B74D6
88
label: BoxPanel, an example custom panel
99
template: detail.hbs
@@ -13,9 +13,7 @@ ms.topic: article
1313
keywords: windows 10, uwp
1414
ms.localizationpriority: medium
1515
---
16-
# BoxPanel, an example custom panel
17-
18-
16+
# "Tutorial: Create a custom panel
1917

2018
Learn to write code for a custom [**Panel**](/uwp/api/Windows.UI.Xaml.Controls.Panel) class, implementing [**ArrangeOverride**](/uwp/api/windows.ui.xaml.frameworkelement.arrangeoverride) and [**MeasureOverride**](/uwp/api/windows.ui.xaml.frameworkelement.measureoverride) methods, and using the [**Children**](/uwp/api/windows.ui.xaml.controls.panel.children) property.
2119

hub/apps/design/style/acrylic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ It's important to ensure that any text your app presents to users meets contrast
9090

9191
## Apply acrylic in your app
9292

93-
To learn how to apply background acrylic or in-app acrylic in your app, including how to create custom acrylic brushes, see [Apply Mica or Acrylic materials in desktop apps for Windows 11](/windows/apps/windows-app-sdk/system-backdrop-controller).
93+
To learn how to apply background acrylic or in-app acrylic in your app, including how to create custom acrylic brushes, see [Apply Mica or Acrylic materials in desktop apps for Windows 11](/windows/apps/develop/ui/system-backdrops).
9494

9595
## Do's and don'ts
9696

hub/apps/design/style/mica.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ You can use Mica in UWP apps that use WinUI for UWP, or in apps that use Windows
126126

127127
### Use Mica with the Windows App SDK
128128

129-
To use Mica in a WinUI XAML app, see [Apply Mica or Acrylic materials in desktop apps for Windows 11](../../windows-app-sdk/system-backdrop-controller.md).
129+
To use Mica in a WinUI XAML app, see [Apply Mica or Acrylic materials in desktop apps for Windows 11](../../develop/ui/system-backdrops.md).
130130

131131
To use Mica in a Win32 app, see [Apply Mica in Win32 desktop apps for Windows 11](../../desktop/modernize/ui/apply-mica-win32.md).
132132

133133
## Related articles
134134

135135
- [Materials](../signature-experiences/materials.md)
136136
- [Layering and Elevation](../signature-experiences/layering.md)
137-
- [Apply Mica or Acrylic materials in desktop apps for Windows 11](../../windows-app-sdk/system-backdrop-controller.md)
137+
- [Apply Mica or Acrylic materials in desktop apps for Windows 11](../../develop/ui/system-backdrops.md)
138138
- [Apply Mica in Win32 desktop apps for Windows 11](../../desktop/modernize/ui/apply-mica-win32.md)
139139
- [NavigationView](../controls/navigationview.md)

hub/apps/develop/motion/motion-in-practice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ doc-status: Published
99
ms.localizationpriority: medium
1010
ms.custom: RS5
1111
---
12-
# Bringing it together
12+
# Animations in Windows app
1313

1414
Timing, easing, directionality, and gravity work together to form the foundation of Fluent motion. Each has to be considered in the context of the others, and applied appropriately in the context of your app.
1515

hub/apps/develop/toc.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ items:
559559
items:
560560
- name: Overview
561561
href: user-interface.md
562+
- name: Alignment, margin, and padding
563+
href: ui/alignment-margin-padding.md
564+
- name: Colors and themes
565+
href: ui/theming.md
562566
- name: Controls
563567
items:
564568
- name: Overview
@@ -747,39 +751,39 @@ items:
747751
href: ui/controls/title-bar.md
748752
- name: "Tutorial: Build XAML templated controls"
749753
href: ../winui/winui3/xaml-templated-controls-winui-3.md
750-
- name: Shadows
751-
href: ui/shadows.md
752-
- name: Colors and themes
753-
href: ui/theming.md
754-
- name: Alignment, margin, and padding
755-
href: ui/alignment-margin-padding.md
756-
- name: Layout panels
757-
href: ui/layout-panels.md
758-
- name: Responsive layouts
759-
href: ui/layouts-with-xaml.md
760-
- name: Materials (Acrylic / Mica)
761-
href: ../windows-app-sdk/system-backdrop-controller.md
762754
- name: Layout
763755
items:
764-
- name: Custom panels
765-
href: ../design/layout/custom-panels-overview.md
766-
- name: 'Custom panel example: BoxPanel'
767-
href: ../design/layout/boxpanel-example-custom-panel.md
768-
- name: Attached Layout
756+
- name: Panels
757+
items:
758+
- name: Layout panels
759+
href: ui/layout-panels.md
760+
- name: Custom panels
761+
href: ../design/layout/custom-panels-overview.md
762+
- name: "Tutorial: Create a custom panel"
763+
href: ../design/layout/boxpanel-example-custom-panel.md
764+
- name: Attached layouts
769765
href: ../design/layout/attached-layouts.md
770766
- name: Transforms
771767
href: platform/xaml/transforms.md
772768
- name: 3-D perspective effects
773769
href: platform/xaml/3-d-perspective-effects.md
774770
- name: Navigation
775771
items:
776-
- name: Basic page navigation
777-
href: ui/navigation/navigate-between-two-pages.md
778772
- name: Navigation history and backwards navigation
779773
href: ui/navigation/navigation-history-and-backwards-navigation.md
774+
- name: "Tutorial: Implement navigation between two pages"
775+
href: ui/navigation/navigate-between-two-pages.md
776+
- name: Materials
777+
items:
778+
- name: Overview
779+
href: ui/materials.md
780+
- name: System backdrops (Mica/Acrylic)
781+
href: ui/system-backdrops.md
782+
- name: In-app acrylic
783+
href: ui/in-app-acrylic.md
780784
- name: Motion
781785
items:
782-
- name: Motion in practice
786+
- name: Overview
783787
href: motion/motion-in-practice.md
784788
- name: Page transitions
785789
href: motion/page-transitions.md
@@ -796,6 +800,10 @@ items:
796800
href: motion/storyboarded-animations.md
797801
- name: Key-frame and easing function animations
798802
href: motion/key-frame-and-easing-function-animations.md
803+
- name: Responsive layouts
804+
href: ui/layouts-with-xaml.md
805+
- name: Shadows
806+
href: ui/shadows.md
799807
- name: Windowing
800808
items:
801809
- name: Overview
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: In-app acrylic
3+
description: Learn how to use AcrylicBrush to apply in-app acrylic effects to UI elements in your WinUI app.
4+
ms.topic: how-to
5+
ms.date: 02/27/2026
6+
keywords: windows, windows app development, Windows App SDK, Acrylic, AcrylicBrush, materials
7+
ms.localizationpriority: medium
8+
---
9+
10+
# In-app acrylic
11+
12+
You can apply in-app acrylic to your app's surfaces using a XAML [AcrylicBrush](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.acrylicbrush) or predefined `AcrylicBrush` theme resources.
13+
14+
> [!div class="nextstepaction"]
15+
> [Open the WinUI Gallery app and see Acrylic in action](winui3gallery://item/Acrylic)
16+
17+
WinUI includes a collection of brush theme resources that respect the app's theme and fall back to solid colors as needed. To paint a specific surface, apply one of the theme resources to element backgrounds just as you would apply any other brush resource.
18+
19+
```xaml
20+
<Grid Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}">
21+
```
22+
23+
> [!NOTE]
24+
> You can view these resources in the [AcrylicBrush theme resources file, in the microsoft-ui-xaml GitHub repo](https://github.com/microsoft/microsoft-ui-xaml/blob/6aed8d97fdecfe9b19d70c36bd1dacd9c6add7c1/dev/Materials/Acrylic/AcrylicBrush_19h1_themeresources.xaml#L11).
25+
26+
## Custom acrylic brush
27+
28+
You may choose to add a color tint to your app's acrylic to show branding or provide visual balance with other elements on the page. To show color rather than grayscale, you need to define your own acrylic brushes using the following properties.
29+
30+
- **TintColor**: the color/tint overlay layer.
31+
- **TintOpacity**: the opacity of the tint layer.
32+
- **TintLuminosityOpacity**: controls the amount of saturation that is allowed through the acrylic surface from the background.
33+
- **FallbackColor**: the solid color that replaces acrylic in Battery Saver. For background acrylic, fallback color also replaces acrylic when your app isn't in the active desktop window.
34+
35+
![Light theme acrylic swatches](../../design/style/images/custom-acrylic-swatches-light-theme.png)
36+
37+
![Dark theme acrylic swatches](../../design/style/images/custom-acrylic-swatches-dark-theme.png)
38+
39+
![Luminosity opacity compared to tint opacity](../../design/style/images/luminosity-vs-tint.png)
40+
41+
To add an acrylic brush, define the three resources for dark, light, and high contrast themes. In high contrast, we recommend that you use a [SolidColorBrush](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.solidcolorbrush) with the same `x:Key` as the dark/light AcrylicBrush.
42+
43+
> [!NOTE]
44+
> If you don't specify a `TintLuminosityOpacity` value, the system will automatically adjust its value based on your TintColor and TintOpacity.
45+
46+
```xaml
47+
<ResourceDictionary.ThemeDictionaries>
48+
<ResourceDictionary x:Key="Default">
49+
<AcrylicBrush x:Key="MyAcrylicBrush"
50+
TintColor="#FFFF0000"
51+
TintOpacity="0.8"
52+
TintLuminosityOpacity="0.5"
53+
FallbackColor="#FF7F0000"/>
54+
</ResourceDictionary>
55+
56+
<ResourceDictionary x:Key="HighContrast">
57+
<SolidColorBrush x:Key="MyAcrylicBrush"
58+
Color="{ThemeResource SystemColorWindowColor}"/>
59+
</ResourceDictionary>
60+
61+
<ResourceDictionary x:Key="Light">
62+
<AcrylicBrush x:Key="MyAcrylicBrush"
63+
TintColor="#FFFF0000"
64+
TintOpacity="0.8"
65+
TintLuminosityOpacity="0.5"
66+
FallbackColor="#FFFF7F7F"/>
67+
</ResourceDictionary>
68+
</ResourceDictionary.ThemeDictionaries>
69+
```
70+
71+
The following sample shows how to declare an AcrylicBrush in code.
72+
73+
```csharp
74+
AcrylicBrush myBrush = new AcrylicBrush();
75+
myBrush.TintColor = Color.FromArgb(255, 202, 24, 37);
76+
myBrush.FallbackColor = Color.FromArgb(255, 202, 24, 37);
77+
myBrush.TintOpacity = 0.6;
78+
79+
grid.Fill = myBrush;
80+
```
81+
82+
## Related articles
83+
84+
- [Materials overview](materials.md)
85+
- [System backdrops (Mica/Acrylic)](system-backdrops.md)
86+
- [Acrylic design guidance](../../design/style/acrylic.md)

hub/apps/develop/ui/layouts-with-xaml.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ The default column width is "*", so you don't need to explicitly set this value
6363
</Grid>
6464
```
6565

66-
In the Visual Studio XAML designer, the result looks like this.
67-
68-
![A 4 column grid in the Visual Studio designer](../../design/layout/images/xaml-layout-grid-in-designer.png)
69-
7066
To get the size of an element at runtime, use the read-only [**ActualHeight**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.frameworkelement.actualheight) and [**ActualWidth**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.frameworkelement.actualwidth) properties instead of Height and Width.
7167

7268
**Size constraints**
@@ -135,11 +131,11 @@ To apply a visual state from code, you call the [**VisualStateManager.GoToState*
135131
Here, a [**VisualStateGroup**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.visualstategroup) contains two VisualState definitions. The first, `DefaultState`, is empty. When it's applied, the values defined in the XAML page are applied. The second, `WideState`, changes the [**DisplayMode**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.splitview.displaymode) property of the [**SplitView**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.splitview) to **Inline** and opens the pane. This state is applied in the SizeChanged event handler if the window width is greater than 640 effective pixels.
136132

137133
> [!NOTE]
138-
> Windows doesn't provide a way for your app to detect the specific device your app is running on. It can tell you the device family (desktop, etc) the app is running on, the effective resolution, and the amount of screen space available to the app (the size of the app's window). We recommend defining visual states for [screen sizes and break points](../../design/layout/screen-sizes-and-breakpoints-for-responsive-design.md).
134+
> Windows doesn't provide a way for your app to detect the specific device your app is running on. It can tell you the effective resolution, and the amount of screen space available to the app (the size of the app's window). We recommend defining visual states for [screen sizes and break points](../../design/layout/screen-sizes-and-breakpoints-for-responsive-design.md).
139135
140136
```xaml
141137
<Page ...
142-
SizeChanged="CurrentWindow_SizeChanged">
138+
SizeChanged="Page_SizeChanged">
143139
<Grid>
144140
<VisualStateManager.VisualStateGroups>
145141
<VisualStateGroup>
@@ -182,7 +178,7 @@ Here, a [**VisualStateGroup**](/windows/windows-app-sdk/api/winrt/microsoft.ui.x
182178
```
183179

184180
```csharp
185-
private void CurrentWindow_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
181+
private void Page_SizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
186182
{
187183
if (e.Size.Width > 640)
188184
VisualStateManager.GoToState(this, "WideState", false);
@@ -193,10 +189,10 @@ private void CurrentWindow_SizeChanged(object sender, Windows.UI.Core.WindowSize
193189

194190
```cppwinrt
195191
// YourPage.h
196-
void CurrentWindow_SizeChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::SizeChangedEventArgs const& e);
192+
void Page_SizeChanged(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::SizeChangedEventArgs const& e);
197193
198194
// YourPage.cpp
199-
void YourPage::CurrentWindow_SizeChanged(IInspectable const& sender, SizeChangedEventArgs const& e)
195+
void YourPage::Page_SizeChanged(IInspectable const& sender, SizeChangedEventArgs const& e)
200196
{
201197
if (e.NewSize.Width > 640)
202198
VisualStateManager::GoToState(*this, "WideState", false);

hub/apps/develop/ui/materials.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Materials overview
3+
description: Learn about materials in Windows apps, including Mica, Acrylic, and in-app acrylic brushes.
4+
ms.topic: concept-article
5+
ms.date: 02/27/2026
6+
keywords: windows, windows app development, Windows App SDK, Mica, Acrylic, materials
7+
ms.localizationpriority: medium
8+
---
9+
10+
# Materials in Windows apps
11+
12+
[Materials](../../design/signature-experiences/materials.md) are visual effects applied to UX surfaces that resemble real life artifacts. They play a key role in creating depth, hierarchy, and visual interest in your app's interface.
13+
14+
Windows provides two primary material types:
15+
16+
- [**Mica**](../../design/style/mica.md) — An opaque material that incorporates the user's theme and desktop wallpaper to create a highly personalized appearance. Mica is designed for performance as it only captures the background wallpaper once to create its visualization, making it ideal for the foundation layer of your app, especially in the title bar area.
17+
18+
- [**Acrylic**](../../design/style/acrylic.md) — A semi-transparent material that replicates the effect of frosted glass. Acrylic can be used as a system backdrop for transient, light-dismiss surfaces (such as flyouts and context menus), or as an in-app brush applied directly to UI elements.
19+
20+
## How to use materials
21+
22+
There are two ways to use materials in your WinUI apps:
23+
24+
- **[System backdrops (Mica/Acrylic)](system-backdrops.md)** — Apply Mica or Desktop Acrylic as the background of your app window or transient UI surfaces like flyouts and popups. This is set via the `SystemBackdrop` property on `Window`, `Flyout`, `Popup`, and other elements.
25+
26+
- **[In-app acrylic](in-app-acrylic.md)** — Apply acrylic effects directly to UI elements within your app using `AcrylicBrush` theme resources or custom acrylic brushes. This is useful for panels, sidebars, and other content areas where you want a translucent effect.
27+
28+
## Related articles
29+
30+
- [Materials in Windows 11](../../design/signature-experiences/materials.md)
31+
- [Mica design guidance](../../design/style/mica.md)
32+
- [Acrylic design guidance](../../design/style/acrylic.md)

hub/apps/develop/ui/navigation/navigate-between-two-pages.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Learn how to enable peer-to-peer navigation between two basic pages in an Windows app.
3-
title: Peer-to-peer navigation between two pages
3+
title: "Tutorial: Implement navigation between two pages"
44
ms.assetid: 0A364C8B-715F-4407-9426-92267E8FB525
55
label: Peer-to-peer navigation between two pages
66
template: detail.hbs
@@ -13,7 +13,7 @@ dev_langs:
1313
- cppwinrt
1414
---
1515

16-
# Implement navigation between two pages
16+
# Tutorial: Implement navigation between two pages
1717

1818
Learn how to use a frame and pages to enable basic peer-to-peer navigation in your app.
1919

@@ -36,7 +36,7 @@ To create a blank app in Visual Studio:
3636
1. To set up your development computer, see [Start developing Windows apps](../../../get-started/start-here.md).
3737
1. From the Microsoft Visual Studio start window, select **Create a new project**, OR, on the Visual Studio menu, choose **File** > **New** > **Project**.
3838
1. In the **Create a new project** dialog's drop-down filters, select **C#** or **C++**, **Windows**, and **WinUI**, respectively.
39-
1. Select the **Blank App, Packaged (WinUI in Desktop)** project template, and click **Next**. That template creates a desktop app with a WinUI-based user interface.
39+
1. Select the **WinUI Blank App (Packaged)** project template, and click **Next**. That template creates a desktop app with a WinUI-based user interface.
4040
1. In the **Project name** box, enter `BasicNavigation`, and click **Create**.
4141
1. To run the program, choose **Debug** > **Start Debugging** from the menu, or press F5. Build and run your solution on your development computer to confirm that the app runs without errors. A blank page is displayed.
4242
1. To stop debugging and return to Visual Studio, exit the app, or click **Stop Debugging** from the menu.
@@ -116,7 +116,7 @@ To add a new item to your app:
116116

117117
1. In **Solution Explorer**, right-click the `BasicNavigation` project node to open the context menu.
118118
1. Choose **Add** > **New Item** from the context menu.
119-
1. In the **Add New Item** dialog box, select the **WinUI** node in the left pane, then choose **Blank Page (WinUI)** in the middle pane.
119+
1. In the **Add New Item** dialog box, select the **WinUI** node in the left pane, then choose **Blank Page** in the middle pane.
120120
1. In the **Name** box, enter `MainPage` and press the **Add** button.
121121
1. Repeat steps 1-4 to add the second page, but in the **Name** box, enter `Page2`.
122122

0 commit comments

Comments
 (0)