Skip to content

Commit aedc6a2

Browse files
committed
Merge branch 'main' into alvinashcraft/main-update-settings-uri-parameters
2 parents e1a779d + 225a64c commit aedc6a2

File tree

20 files changed

+330
-122
lines changed

20 files changed

+330
-122
lines changed

hub/apps/design/style/spacing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ The following examples show how the `Compact` style can be applied for the page
7272
</Grid>
7373
```
7474

75-
## Sizing in Windows 10
75+
## Sizing in Windows apps
7676

77-
For the Windows 10 October 2018 Update (version 1809), the standard, default size for all Windows XAML controls was decreased to increase usability across all usage scenarios.
77+
In the Windows 10 October 2018 Update (version 1809 and later), the standard, default size for all Windows XAML controls was decreased to increase usability across all usage scenarios.
7878

7979
The following image shows some of the control layout changes that were introduced with the Windows 10 October 2018 Update. Specifically, the margin between a header and the top of a control was decreased from 8epx to 4epx, and the 44epx grid was changed to a 40epx grid.
8080

hub/apps/design/widgets/widgets-create-a-template.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,20 @@ At the top of the page, from the **Select host app** dropdown, choose Widgets Bo
3232

3333
There are three text editors at the bottom of the page. The one labeled **Card Payload Editor** contains the JSON definition of your widget's UI. The editor labeled **Sample Data Editor** contains JSON that defines an optional data context for your widget. The data context is bound dynamically to the Adaptive Card when the widget is rendered. For more information about data binding in Adaptive Cards, see [Adaptive Cards Template Language](/adaptive-cards/templating/language).
3434

35-
The third text editor is labeled **Sample Host Data Editor**. Note that this editor may collapse below the page's other two editors. If so, click the + to expand the editor. Widget host apps such as the Widgets Board have two properties that indicate the size and theme of your widget. These properties are named *host.widgetSize* and *host.hostTheme*. The supported sizes are "small", "medium", and "large". The supported themes are "light" and "dark". Your widget template can dynamically display different content based on the current value of these properties. To see how your widget responds to changes in size and theme, you can adjust the values for these properties in the editor, or you can also set these values in the **Container size** and **Theme** dropdowns next to the **Select host app** dropdown at the top of the page.
35+
The third text editor is labeled **Sample Host Data Editor**. Note that this editor may collapse below the page's other two editors. If so, click the + to expand the editor. Widget host apps can specify host properties that you can use in your widget template to dynamically display different content based on the current property values. The Widgets Board supports the following host properties.
36+
37+
| Property | Value | Description |
38+
|----------|-------|-------------|
39+
| host.widgetSize | "small", "medium", or "large" | The size of the pinned widget. |
40+
| host.hostTheme | "light" or "dark" | The current theme of the device on which the Widgets Board is displayed. |
41+
| host.isSettingsPayload | true or false | When this value is true, the user has clicked on the **Customize widget** button in the widget context menu. You can use this property value to display customization settings UI elements. This is an alternative method to using [IWidgetProvider2.OnCustomizationRequested](/windows/windows-app-sdk/api/winrt/microsoft.windows.widgets.providers.iwidgetprovider2.oncustomizationrequested) to alter the JSON payload in the widget provider app. For more information, see [Implementing widget customization](/windows/apps/develop/widgets/implement-widget-provider-cs#implementing-widget-customization). |
42+
| host.isHeaderSupported | true or false | When this value is true, header customization is supported. For more information, see [isHeaderSupported](/windows/apps/develop/widgets/widget-header-customization). |
43+
| host.isHeader | true or false | When this value is true, the host is requesting a payload specifically for rendering of the widget header. |
44+
| host.isWebSupported | true or false | When this value is false, the host does not currently support loading a widget's web content. When this occurs, web widgets will display the fallback JSON payload supplied by the widget provider, but this value can be use to further customize the content. For more information, see [Web widget providers](/windows/apps/develop/widgets/web-widget-providers) |
45+
| host.isUserContextAuthenticated | true or false | When this value is false, the only action that is supported is [Action.OpenUrl](https://adaptivecards.io/explorer/Action.OpenUrl.html). The value of *isUserContextAuthenticated* can be used to adjust widget content appropriately, given the interactivity limitations. |
46+
47+
48+
The **Container size** and **Theme** dropdowns next to the **Select host app** dropdown at the top of the page allow you to set these properties without manually editing the sample host JSON in the editor.
3649

3750
## Create a new card
3851

@@ -156,4 +169,53 @@ The following code listing shows the final version of the JSON payload.
156169
}
157170
]
158171
}
159-
```
172+
```
173+
174+
## Settings payload example
175+
176+
The following code listing shows a simple example of a JSON payload that uses the **host.isSettingsPayload** property to display different
177+
content when the user has clicked the **Customize widget** button.
178+
179+
```json
180+
{
181+
"type": "AdaptiveCard",
182+
"body": [
183+
{
184+
"type": "Container",
185+
"items":[
186+
{
187+
"type": "TextBlock",
188+
"text": "Content payload",
189+
"$when": "${!$host.isSettingsPayload}"
190+
}
191+
]
192+
},
193+
{
194+
"type": "Container",
195+
"items":[
196+
{
197+
"type": "TextBlock",
198+
"text": "Settings payload",
199+
"$when": "${$host.isSettingsPayload}"
200+
}
201+
]
202+
}
203+
],
204+
"actions": [
205+
{
206+
"type": "Action.Submit",
207+
"title": "Increment",
208+
"verb": "inc",
209+
"$when": "${!$host.isSettingsPayload}"
210+
},
211+
{
212+
"type": "Action.Submit",
213+
"title": "Update Setting",
214+
"verb": "setting",
215+
"$when": "${$host.isSettingsPayload}"
216+
}
217+
],
218+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
219+
"version": "1.6"
220+
}
221+
```

hub/apps/develop/data-access/mysql-database.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Use a MySQL database in a Windows app
33
description: Learn how to connect to a MySQL database from your Windows app, and test your connection using sample code.
4-
ms.date: 08/01/2024
4+
ms.date: 01/23/2025
5+
ms.collection: ce-skilling-ai-copilot
6+
ms.custom: copilot-scenario-highlight
57
ms.topic: how-to
68
keywords: windows, windows app sdk, MySQL, database, uwp, wpf, winforms, windows forms, winui
79
ms.localizationpriority: medium
@@ -21,6 +23,9 @@ This example can be used with any WPF, Windows Forms, WinUI 3, and UWP project t
2123

2224
This will allow you to programmatically access MySQL databases.
2325

26+
> [!NOTE]
27+
> [MySQL Connector/NET](https://dev.mysql.com/downloads/connector/net/) version 6.4.4 or later is required to use the `MySql.Data` package with Windows authentication.
28+
2429
## Test your connection using sample code
2530

2631
The following is an example of connecting to and reading from a remote MySQL database. Note that the server address and database name will need to be customized.
@@ -46,8 +51,19 @@ using (var mySqlCn = new MySqlConnection(M_str_sqlcon))
4651
> [!IMPORTANT]
4752
> In production applications, connection information should be stored securely in app configuration (see [**Adding Azure App Configuration by using Visual Studio Connected Services**](/visualstudio/azure/vs-azure-tools-connected-services-app-configuration)). Connection strings and other secrets should not be hard-coded.
4853
49-
> [!NOTE]
50-
> [MySQL Connector/NET](https://dev.mysql.com/downloads/connector/net/) version 6.4.4 or later is required to use the `MySql.Data` package with Windows authentication.
54+
## Building a connection string with GitHub Copilot
55+
56+
You can use GitHub Copilot to build the connection string for your MySQL database. You can customize the prompt to create a connection string per your requirements.
57+
58+
The following text shows an example prompt for Copilot Chat that generates a connection string similar to the one shown in the previous code snippet:
59+
60+
```copilot-prompt
61+
Show me how to create a MySQL connection string to a server named myServerAddress and a database called myDatabase. Use Windows authentication.
62+
```
63+
64+
GitHub Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot FAQs](https://aka.ms/copilot-general-use-faqs).
65+
66+
Learn more about [GitHub Copilot in Visual Studio](/visualstudio/ide/visual-studio-github-copilot-install-and-states) and [GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview).
5167

5268
## Related content
5369

hub/apps/get-started/samples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ These additional tools will help you [set up your development environment on Win
9595

9696
:::row:::
9797
:::column:::
98-
[**Dev Home**](/windows/dev-home/)<br/> Introduced with Windows 11, Dev Home is a dashboard that provides quick access to the tools you need to develop apps for Windows.
98+
[**Dev Home**](/windows/dev-home/)<br/> Introduced with Windows 11, Dev Home was an experimental dashboard that provided quick access to the tools used to develop apps for Windows. Dev Home will no longer be supported beginning May 2025.
9999
:::column-end:::
100100
:::column:::
101101
[**Dev Drive**](/windows/dev-drive/)<br/>In order to speed up common development tasks, you can create a specially formatted drive (a Dev Drive) that is used to store your projects.

hub/apps/publish/publish-your-app/msix/screenshots-and-images.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: You can select the screenshots, logos, and other art assets (such as trailers and promotional images) to include in your MSIX app's Store listing.
33
title: App screenshots, images, and trailers for MSIX app
4-
ms.date: 9/26/2024
4+
ms.date: 1/24/2025
55
ms.topic: article
66
ms.localizationpriority: medium
77
---
@@ -40,7 +40,7 @@ The size requirements vary depending on the device family:
4040

4141
For the best display, keep the following guidelines in mind when creating your screenshots:
4242

43-
- Keep critical visuals and text in the top 3/4 of the image. Text overlays may appear on the bottom 1/4.
43+
- Keep critical visuals and text in the top two-thirds of the image. Text overlays may appear on the bottom third.
4444
- Don’t add additional logos, icons, or marketing messages to your screenshots.
4545
- Don’t use extremely light or dark colors or highly-contrasting stripes that may interfere with readability of text overlays.
4646

@@ -62,19 +62,19 @@ For games, this is used as the main logo image for customers on Windows 10, Wind
6262

6363
Your listing may not look good if you don't include it, and it won't be consistent with other listings that customers see while browsing the Store. This image may also be used in search results or in editorially curated collections.
6464

65-
This image can include your app’s name. If you have added the app name on the image, it should meet accessible readability requirements (4.51 contrast ratio). Note that text overlays may appear on the bottom quarter of this image, so make sure you don't include text or key imagery there.
65+
This image can include your app’s name. If you have added the app name on the image, it should meet accessible readability requirements (4.51 contrast ratio). Note that text overlays may appear on the bottom third of this image, so make sure you don't include text or key imagery there.
6666

6767
> [!NOTE]
68-
> If your app is available to customers on Xbox, this image is **required** and must include the product's title. The title must appear in the top three-quarters of the image, since text overlays may appear on the bottom quarter of the image.
68+
> If your app is available to customers on Xbox, this image is **required** and must include the product's title. The title must appear in the top two-thirds of the image, since text overlays may appear on the bottom third of the image.
6969
7070
#### 1:1 box art (1080 x 1080 or 2160 x 2160 pixels)
7171

7272
For games, this image may appear in various Store pages for Windows 10, Windows 11, and Xbox devices, and if you don't provide the **2:3 Poster art** image it will be used as your main logo. This does not apply to apps. For information related to app icons, please refer to the section below on [1:1 App tile icon (300 x 300 pixels)](#11-app-tile-icon-300-x-300-pixels).
7373

74-
This image can also include your app’s name. Text overlays may appear on the bottom quarter of this image, so don't include text or key imagery there.
74+
This image can also include your app’s name. Text overlays may appear on the bottom third of this image, so don't include text or key imagery there.
7575

7676
> [!NOTE]
77-
> If your app is available to customers on Xbox, this image is **required** and must include the product's title. The title must appear in the top three-quarters of the image, since text overlays may appear on the bottom quarter of the image.
77+
> If your app is available to customers on Xbox, this image is **required** and must include the product's title. The title must appear in the top two-thirds of the image, since text overlays may appear on the bottom third of the image.
7878
7979
#### 1:1 App tile icon (300 x 300 pixels)
8080

@@ -206,8 +206,8 @@ These images are required for proper display if you publish your app to Xbox.
206206

207207
There are 3 different sizes that you can upload:
208208

209-
- **Branded key art, 584 x 800 pixels**: Must include the product’s title. A Branding Bar is required on this image. Keep the title and all key imagery in the top three-quarters of the image, as an overlay may appear over the bottom quarter.
210-
- **Titled hero art, 1920 x 1080 pixels**: Must include the product’s title. Keep the title and all key imagery in the top three-quarters of the image, as an overlay may appear over the bottom quarter.
209+
- **Branded key art, 584 x 800 pixels**: Must include the product’s title. A Branding Bar is required on this image. Keep the title and all key imagery in the top two-thirds of the image, as an overlay may appear over the bottom third.
210+
- **Titled hero art, 1920 x 1080 pixels**: Must include the product’s title. Keep the title and all key imagery in the top two-thirds of the image, as an overlay may appear over the bottom third.
211211
- **Featured Promotional Square art, 1080 x 1080 pixels**: Must _not_ include the product’s title.
212212

213213
> [!NOTE]

hub/apps/whats-new/windows-11-build-22000.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Feature | Description
4747
## Developer tools
4848
Feature | Description
4949
:------ | :------
50-
[Dev Home Overview](/windows/dev-home/) | Dev Home is a new control center for Windows providing the ability to monitor projects in your dashboard using customizable widgets, set up your dev environment by downloading apps, packages, or repositories, connect to your developer accounts and tools (such as GitHub), and create a Dev Drive for storage all in one place.
50+
[Dev Home Overview](/windows/dev-home/) | Dev Home was an experimental control center for Windows, but will no longer be supported beginning May 2025. Dev Home provided the ability to monitor projects in your dashboard using customizable widgets, set up your dev environment by downloading apps, packages, or repositories, connect to your developer accounts and tools (such as GitHub), and create a Dev Drive for storage all in one place.
5151
[WSL (Windows Subsystem for Linux)](/windows/wsl/) | Windows Subsystem for Linux (WSL) is a feature of Windows that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting.
5252

5353

hub/apps/windows-dotnet-maui/index.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
title: Build Windows apps with .NET MAUI
33
description: Learn about .NET MAUI, benefits it provides to Windows developers, and how take your Windows apps cross-platform.
4-
ms.topic: article
5-
ms.date: 05/09/2024
4+
ms.topic: concept-article
5+
ms.date: 01/23/2025
66
keywords: windows win32, desktop development, Windows App SDK, .net maui
77
ms.localizationpriority: medium
8+
#Customer intent: As a Windows developer, I want to learn about .NET MAUI, the benefits it provides to Windows developers, and how to take my Windows apps cross-platform.
89
---
910

1011
# Build Windows apps with .NET MAUI
@@ -28,6 +29,9 @@ If you are planning to build a new app for Windows and want to target additional
2829
- **Native Controls**: .NET MAUI does not currently support using Windows App SDK controls. If you have existing controls from other Windows App SDK projects you intend to re-use or rely on 3rd Party or open source controls, you will need to find alternatives for .NET MAUI projects.
2930
- **Closer to Windows**: When writing .NET MAUI apps, it outputs a Windows App SDK app, but there is some translation to get from your code to the native Windows app. With Windows App SDK, you are eliminating that translation step and are less likely to encounter issues with styles, API compatibility, or layout.
3031

32+
> [!TIP]
33+
> Are you still deciding between .NET MAUI, WinUI, and other UI framework options? Check out the [Windows developer FAQ](../get-started/windows-developer-faq.yml) to learn about the different options for building native Windows apps. Then go watch the **Windows Dev Chat** episode on **Choosing your ideal dev platform**. The segment about [.NET MAUI](https://www.youtube.com/watch?v=4PJBJ8GICjM&list=PLI_J2v67C23bxTffW4XewbUEAOfSVZkrk&index=2&t=2193s) hosted by Beth Massi walks through examples and reasons for choosing .NET MAUI for your next app.
34+
3135
## .NET MAUI resources for Windows developers
3236

3337
### .NET MAUI documentation
@@ -45,7 +49,7 @@ This [one-day live stream](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oWeP
4549
### .NET MAUI blog posts
4650

4751
- [5 .NET MAUI Features for Building Great Desktop Apps](https://devblogs.microsoft.com/dotnet/5-dotnet-maui-desktop-features/)
48-
- [Build Your Own Podcast App with .NET 7, Blazor, and .NET MAUI](https://devblogs.microsoft.com/dotnet/build-your-own-podcast-app-with-dotnet-blazor-and-dotnet-maui/)
52+
- [Build Your Own Podcast App with .NET, Blazor, and .NET MAUI](https://devblogs.microsoft.com/dotnet/build-your-own-podcast-app-with-dotnet-blazor-and-dotnet-maui/)
4953

5054
### GitHub
5155

@@ -82,12 +86,10 @@ If you haven't enabled development mode on your PC, see [Enable your device for
8286

8387
Check out a walk-through of [creating your first .NET MAUI app on Windows](./walkthrough-first-app.md).
8488

85-
## Related topics
89+
## Related content
8690

8791
[What is .NET MAUI](/dotnet/maui/what-is-maui)
8892

89-
[.NET MAUI supported platforms](/dotnet/maui/supported-platforms)
90-
91-
[WinUI overview](../winui/winui3/index.md)
93+
[Windows developer FAQ](../get-started/windows-developer-faq.yml)
9294

9395
[.NET MAUI Community Toolkit documentation](/dotnet/communitytoolkit/maui/)

0 commit comments

Comments
 (0)