Skip to content

Commit 92dfcd3

Browse files
Merge pull request #6600 from MicrosoftDocs/niels9001/widgets
Move a few parts of Widgets to Develop
2 parents a07bc2e + 16f2aa9 commit 92dfcd3

9 files changed

Lines changed: 45 additions & 12 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/design/widgets/widgets-create-a-template.md",
5+
"redirect_url": "/windows/apps/develop/widgets/widgets-create-a-template",
6+
"redirect_document_id": true
7+
},
38
{
49
"source_path": "hub/apps/design/style/sound.md",
510
"redirect_url": "/windows/apps/develop/ui/sound",

hub/apps/design/toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ items:
104104
href: widgets/widgets-states-and-ui.md
105105
- name: Interaction design guidance
106106
href: widgets/widgets-interaction-design.md
107-
- name: Create a template with the Adaptive Card Designer
108-
href: widgets/widgets-create-a-template.md
109107
- name: Integrate with the widget picker
110108
href: widgets/widgets-picker-integration.md
111109
- name: Writing

hub/apps/design/widgets/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,8 @@ Content should dynamically refresh based on available context. It is up to date
7777

7878
[Widget interaction design](widgets-interaction-design.md)
7979

80-
[Create a widget template with the Adaptive Card Designer](widgets-create-a-template.md)
80+
[Create a widget template with the Adaptive Cards Designer](../../develop/widgets/widgets-create-a-template.md)
81+
82+
## See also
83+
84+
- [Develop Windows Widgets](../../develop/widgets/index.md)

hub/apps/design/widgets/widgets-design-fundamentals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For accessibility, the following table presents the text of the table shown in t
8282
| Subtitle | 20/28 epx | Large, Bolder |
8383
| Title | 28/36 epx | Extra Large, Bolder |
8484

85-
Segoe UI is the typeface used in Widgets and across Windows. The above type ramp includes the formulations of how to properly set the right styles in the Adaptive Cards Designer. Typeface styling should not deviate from the specified formulas above. For more information on using the Adaptive Cards Designer to create widget templates, see [Create a widget template with the Adaptive Card Designer](widgets-create-a-template.md).
85+
Segoe UI is the typeface used in Widgets and across Windows. The above type ramp includes the formulations of how to properly set the right styles in the Adaptive Cards Designer. Typeface styling should not deviate from the specified formulas above. For more information on using the Adaptive Cards Designer to create widget templates, see [Create a widget template with the Adaptive Cards Designer](../../develop/widgets/widgets-create-a-template.md).
8686

8787
![Two example widgets with the phrase "The quick brown fox jumped over the lazy dog" and the text "Hyperlink". The left image has dark text on a light background. The right image has light text on a dark background. The hyperlink text is blue in both images.](./images/widgets-designer-default-font-colors.png)
8888

hub/apps/develop/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ items:
595595
- name: Test your app's signature with Smart App Control
596596
href: smart-app-control/test-your-app-with-smart-app-control.md
597597
- name: Widgets
598+
href: widgets/index.md
598599
items:
599600
- name: Feed providers
600601
items:
@@ -622,6 +623,8 @@ items:
622623
href: widgets/widget-provider-manifest.md
623624
- name: ActivateApplication protocol
624625
href: widgets/widget-provider-activateapplication-protocol.md
626+
- name: Adaptive Cards Designer
627+
href: widgets/widgets-create-a-template.md
625628
- name: Windows Search
626629
href: search/index.md
627630
items:

hub/apps/develop/widgets/implement-widget-provider-cs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static Dictionary<string, CompactWidgetInfo> RunningWidgets = new Diction
7878

7979
## Declare widget template JSON strings
8080

81-
This example will declare some static strings to define the JSON templates for each widget. For convenience, these templates are stored in the member variables of the **WidgetProvider** class. If you need a general storage for the templates - they can be included as part of the application package: [Accessing Package Files](/windows/uwp/app-resources/uri-schemes#ms-appx-and-ms-appx-web). For information on creating the widget template JSON document, see [Create a widget template with the Adaptive Card Designer](../../design/widgets/widgets-create-a-template.md).
81+
This example will declare some static strings to define the JSON templates for each widget. For convenience, these templates are stored in the member variables of the **WidgetProvider** class. If you need a general storage for the templates - they can be included as part of the application package: [Accessing Package Files](/windows/uwp/app-resources/uri-schemes#ms-appx-and-ms-appx-web). For information on creating the widget template JSON document, see [Create a widget template with the Adaptive Cards Designer](widgets-create-a-template.md).
8282

8383
In the latest release, apps that implement Windows widgets can customize the header that is displayed for their widget in the Widgets Board, overriding the default presentation. For more information, see [Customize the widget header area](widget-header-customization.md).
8484

hub/apps/develop/widgets/implement-widget-provider-win32.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ struct WidgetProvider : winrt::implements<WidgetProvider, winrt::Microsoft::Wind
158158
159159
## Declare widget template JSON strings
160160
161-
This example will declare some static strings to define the JSON templates for each widget. For convenience, these templates are stored in the local variables declared outside of the **WidgetProvider** class definition. If you need a general storage for the templates - they can be included as part of the application package: [Accessing Package Files](/windows/uwp/app-resources/uri-schemes#ms-appx-and-ms-appx-web). For information on creating the widget template JSON document, see [Create a widget template with the Adaptive Card Designer](../../design/widgets/widgets-create-a-template.md).
161+
This example will declare some static strings to define the JSON templates for each widget. For convenience, these templates are stored in the local variables declared outside of the **WidgetProvider** class definition. If you need a general storage for the templates - they can be included as part of the application package: [Accessing Package Files](/windows/uwp/app-resources/uri-schemes#ms-appx-and-ms-appx-web). For information on creating the widget template JSON document, see [Create a widget template with the Adaptive Cards Designer](widgets-create-a-template.md).
162162
163163
In the latest release, apps that implement Windows widgets can customize the header that is displayed for their widget in the Widgets Board, overriding the default presentation. For more information, see [Customize the widget header area](widget-header-customization.md).
164164

hub/apps/develop/widgets/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: This section of the documentation provides developer guidance for implementing Windows Widgets.
3+
title: Develop Windows Widgets
4+
ms.topic: article
5+
ms.date: 04/08/2026
6+
ms.localizationpriority: medium
7+
---
8+
9+
# Develop Windows Widgets
10+
11+
Windows Widgets are small UI containers that display text and graphics, associated with an app installed on the device. Widgets are displayed in a grid on the Widgets Board, a flyout surface that overlays the Windows desktop. They help users stay on top of what's important by surfacing personalized content and quick actions from installed apps. Widget content is defined using the [Adaptive Cards](https://adaptivecards.io/) format, which enables dynamic binding of data to the widget UI.
12+
13+
:::image type="content" source="../../design/widgets/images/widgets-hero-image.png" alt-text="Screenshot of the Widgets Board. The board is a rounded rectangle with the time displayed at the top, followed by a search bar. The rest of the board is a grid of rounded rectangles each representing a widget. The individual widgets show top news stories, current weather, current traffic, etc.":::
14+
15+
For design guidance, see [Windows Widgets design overview](../../design/widgets/index.md).
16+
17+
## In this section
18+
19+
| Topic | Description |
20+
|--|--|
21+
| [Feed providers](../feeds/feed-providers.md) | Learn how to register your app's content feeds to appear directly in the Windows Widgets Board. |
22+
| [Widget providers](widget-providers.md) | Learn how to implement a widget provider that supplies content, layout, and interactive elements for your widgets. |
23+
| [Adaptive Cards Designer](widgets-create-a-template.md) | Walk through creating a widget template using the Adaptive Cards Designer. |

hub/apps/design/widgets/widgets-create-a-template.md renamed to hub/apps/develop/widgets/widgets-create-a-template.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The UI and interaction for Windows Widgets are implemented using [Adaptive Cards
2020

2121
The example in this article is a simple counting widget that displays an integer value and allows the user to increment the value by clicking on a button in the widget's UI. This example template uses data binding to automatically update the UI based on the data context.
2222

23-
Apps need to implement a widget provider to generate and update the widget template and/or data and pass them to the widget host. The article [Implement a widget provider in a win32 app](../../develop/widgets/implement-widget-provider-win32.md) provides step-by-step guidance for implementing the widget provider for the counting widget that we will generate in the steps below.
23+
Apps need to implement a widget provider to generate and update the widget template and/or data and pass them to the widget host. The article [Implement a widget provider in a win32 app](implement-widget-provider-win32.md) provides step-by-step guidance for implementing the widget provider for the counting widget that we will generate in the steps below.
2424

2525
## The Adaptive Cards Designer
2626

@@ -57,7 +57,7 @@ The counting widget that we will create is very simple, only consisting of 4 [Te
5757

5858
Add four **TextBlock** elements by dragging them from the **Card elements** pane on the left of the page onto the blank adaptive card in the preview pane. At this point, the widget preview should look like the following image. The content again overflows outside of the widget borders, but this will be fixed in the following steps.
5959

60-
:::image type="content" source="images/widgets-designer-walkthrough-1.png" alt-text="An adaptive card in progress. It shows a widget with four lines containing the text New TextBlock. The four lines of text overflow the bottom border of the widget.":::
60+
:::image type="content" source="../../design/widgets/images/widgets-designer-walkthrough-1.png" alt-text="An adaptive card in progress. It shows a widget with four lines containing the text New TextBlock. The four lines of text overflow the bottom border of the widget.":::
6161

6262
## Implementing conditional layout
6363

@@ -91,11 +91,11 @@ In the Adaptive Cards Template Language, the `$when` property specifies that the
9191

9292
Now the preview should look like the following image:
9393

94-
:::image type="content" source="images/widgets-designer-walkthrough-2.png" alt-text="An adaptive card in progress. It shows a widget with four lines containing the text specified in the JSON payload shown in the previous step. Instead of conditionally hiding elements, all of the elements are visible and overflow the bottom border of the image.":::
94+
:::image type="content" source="../../design/widgets/images/widgets-designer-walkthrough-2.png" alt-text="An adaptive card in progress. It shows a widget with four lines containing the text specified in the JSON payload shown in the previous step. Instead of conditionally hiding elements, all of the elements are visible and overflow the bottom border of the image.":::
9595

9696
Note that the conditional statements aren't being reflected in the preview. This is because the designer isn't simulating the behavior of the widget host. Click the **Preview mode** button at the top of the page to start the simulation. The widget preview now looks like the following image:
9797

98-
:::image type="content" source="images/widgets-designer-walkthrough-3.png" alt-text="An adaptive card in progress. It shows a widget with two lines containing the text specified in the JSON payload. Only the TextBlock for the small size is rendered.":::
98+
:::image type="content" source="../../design/widgets/images/widgets-designer-walkthrough-3.png" alt-text="An adaptive card in progress. It shows a widget with two lines containing the text specified in the JSON payload. Only the TextBlock for the small size is rendered.":::
9999

100100
From the **Container size** dropdown, select "Medium" and note that the preview switches to only show the **TextBlock** for the medium size. The container in the preview also changes size, demonstrating how you can use the preview to make sure that your UI fits within the widget container for each supported size.
101101

@@ -109,7 +109,7 @@ Our example widget will use a custom state property named "count". You can see i
109109

110110
Note that the preview now inserts the value specified for the *count* property into the text for the first **TextBlock**.
111111

112-
:::image type="content" source="images/widgets-designer-walkthrough-4.png" alt-text="An adaptive card in progress. The first line of text now includes the value 2 from the data payload.":::
112+
:::image type="content" source="../../design/widgets/images/widgets-designer-walkthrough-4.png" alt-text="An adaptive card in progress. The first line of text now includes the value 2 from the data payload.":::
113113

114114
## Add a button
115115

@@ -129,7 +129,7 @@ With Adaptive Cards, interactive elements are defined with **action** elements.
129129
```
130130
In this JSON string, *type* property specifies the type of action that is being represented. Widgets only support the "Action.Execute" action type. The *title* contains the text that is displayed on the button for the action. The *verb* property is an app-defined string that the widget host will send to the widget provider to communicate the intent associated with the action. A widget can have multiple actions, and the widget provider code will check the value of the verb in the request to determine what action to take.
131131

132-
:::image type="content" source="images/widgets-designer-walkthrough-5.png" alt-text="The final adaptive card. A blue button with the text Increment is displayed after the two text lines.":::
132+
:::image type="content" source="../../design/widgets/images/widgets-designer-walkthrough-5.png" alt-text="The final adaptive card. A blue button with the text Increment is displayed after the two text lines.":::
133133

134134
## The complete widget template
135135

0 commit comments

Comments
 (0)