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
Copy file name to clipboardExpand all lines: hub/apps/develop/data-binding/data-binding-in-depth.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,6 +162,11 @@ In the two examples below, the `Button.Content` property is the binding target,
162
162
<ButtonContent="{Binding ...}" ... />
163
163
```
164
164
165
+
If you're using C++/WinRT, then you'll need to add the [**BindableAttribute**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.bindableattribute) attribute to any runtime class that you want to use the [{Binding}](/windows/uwp/xaml-platform/binding-markup-extension) markup extension with.
166
+
167
+
> [!IMPORTANT]
168
+
> If you're using C++/WinRT, then the [**BindableAttribute**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.bindableattribute) attribute is available with Windows App SDK. Without that attribute, you'll need to implement the [ICustomPropertyProvider](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.icustompropertyprovider) and [ICustomProperty](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.icustomproperty) interfaces in order to be able to use the [{Binding}](/windows/uwp/xaml-platform/binding-markup-extension) markup extension.
169
+
165
170
### Binding object declared using {x:Bind}
166
171
167
172
There's one step we need to do before we author our [{x:Bind}](/windows/uwp/xaml-platform/x-bind-markup-extension) markup. We need to expose our binding source class from the class that represents our page of markup. We do that by adding a property (of type `HostViewModel` in this case) to our `MainWindow` window class.
@@ -234,6 +239,22 @@ Code to support `{x:Bind}` is generated at compile-time in the partial classes f
234
239
235
240
### Binding object declared using {Binding}
236
241
242
+
If you're using C++/WinRT then, to use the [{Binding}](/windows/uwp/xaml-platform/binding-markup-extension) markup extension, you'll need to add the [**BindableAttribute**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.bindableattribute) attribute to any runtime class that you want to bind to. To use [{x:Bind}](/windows/uwp/xaml-platform/x-bind-markup-extension), you don't need that attribute.
> If you're using C++/WinRT, then the [**BindableAttribute**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.bindableattribute) attribute is available with Windows App SDK. Without that attribute, you'll need to implement the [ICustomPropertyProvider](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.icustompropertyprovider) and [ICustomProperty](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.data.icustomproperty) interfaces in order to be able to use the [{Binding}](/windows/uwp/xaml-platform/binding-markup-extension) markup extension.
257
+
237
258
[{Binding}](/windows/uwp/xaml-platform/binding-markup-extension) assumes, by default, that you're binding to the [**DataContext**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.frameworkelement.datacontext) of your markup window. So we'll set the `DataContext` of our window to be an instance of our binding source class (of type `HostViewModel` in this case). The example below shows the markup that declares the binding object. We use the same `Button.Content` binding target we used in the "Binding target" section earlier, and we bind to the `HostViewModel.NextButtonText` property.
Copy file name to clipboardExpand all lines: hub/apps/develop/launch/web-to-app-linking.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,21 @@ Create a JSON file (without the .json file extension) named **windows-app-web-li
63
63
64
64
Windows will make an https connection to your website and will look for the corresponding JSON file on your web server.
65
65
66
+
### Subdomain support
67
+
68
+
If your app manifest includes both a main domain (for example, `example.com`) and wildcard subdomains (for example, `*.example.com`), you need to add the `allowSubdomains` field to your JSON file to enable subdomain linking. Without this field, links to subdomains will open in the browser instead of your app.
69
+
70
+
```JSON
71
+
[{
72
+
"packageFamilyName" : "Your app's package family name, e.g MyApp_9jmtgj1pbbz6e",
73
+
"paths" : [ "*" ],
74
+
"excludePaths" : [ "/news/*", "/blog/*" ],
75
+
"allowSubdomains" : true
76
+
}]
77
+
```
78
+
79
+
When `allowSubdomains` is set to `true`, links to subdomains like `subdomain.example.com/path` will correctly open in your app instead of the browser.
80
+
66
81
### Wildcards
67
82
68
83
The JSON file example above demonstrates the use of wildcards. Wildcards allow you to support a wide variety of links with fewer lines of code. Web-to-app linking supports two types of wildcards in the JSON file:
@@ -90,6 +105,9 @@ If you have two apps that you would like to link to your website, list both of t
90
105
}]
91
106
```
92
107
108
+
> [!NOTE]
109
+
> If your apps need to support subdomains, add `"allowSubdomains": true` to each app entry in the JSON file.
110
+
93
111
To provide the best experience for your users, use exclude paths to make sure that online-only content is excluded from the supported paths in your JSON file.
94
112
95
113
Exclude paths are checked first and if there is a match the corresponding page will be opened with the browser instead of the designated app. In the example above, ‘/news/\*’ includes any pages under that path while ‘/news\*’ (no forward slash trails 'news') includes any paths under ‘news\*’ such as ‘newslocal/’, ‘newsinternational/’, and so on.
Copy file name to clipboardExpand all lines: hub/apps/develop/security/smart-cards.md
+68-2Lines changed: 68 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,64 @@ Once [RequestVirtualSmartCardCreationAsync](/uwp/api/windows.devices.smartcards.
84
84
85
85
To authenticate with smart cards or virtual smart cards, your app must provide the behavior to complete challenges between the admin key data stored on the card, and the admin key data maintained by the authentication server or management tool.
86
86
87
+
### Obtaining the admin key
88
+
89
+
Before you can perform authentication, you need to obtain the admin key. The source of the admin key depends on your scenario:
90
+
91
+
-**For virtual smart cards you created**: Use the same admin key that was generated during card creation (as shown in the "Create a virtual smart card" section above). You should store this key securely for later authentication use.
92
+
-**For existing physical or virtual smart cards**: The admin key is typically provided by your organization's IT department, card management system, or the service that issued the card.
93
+
-**For development/testing**: You can generate a test admin key using [CryptographicBuffer.GenerateRandom](/uwp/api/windows.security.cryptography.cryptographicbuffer.generaterandom) as shown in the virtual card creation example below.
94
+
95
+
```cs
96
+
// Example: Store the admin key from virtual card creation for later use
thrownewInvalidOperationException("Admin key not found. Ensure the smart card was created by this app or the admin key was provided by your IT department.");
The following code shows how to support smart card authentication for services or modification of physical or virtual card details. If the data generated using the admin key on the card ("challenge") is the same as the admin key data provided by the server or management tool ("adminkey"), authentication is successful.
Copy file name to clipboardExpand all lines: hub/apps/windows-app-sdk/applifecycle/applifecycle-instancing.md
+27-36Lines changed: 27 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,56 +336,47 @@ Unlike the UWP version of `RedirectActivationTo`, the Windows App SDK's implemen
336
336
337
337
### Redirection without blocking
338
338
339
-
Most apps will want to redirect as early as possible, before doing unnecessary initialization work. For some app types, initialization logic runs on an STA thread, which must not be blocked. AppInstance.RedirectActivationToAsync method is asynchronous, and the calling app must wait for the method to complete, otherwise the redirection will fail. However, waiting on an async call will block the STA. In these situations, call RedirectActivationToAsync in another thread, and set an event when the call completes. Then wait on that event using non-blocking APIs such as CoWaitForMultipleObjects. Here’s a C# sample for a WPF app.
339
+
Most apps will want to redirect as early as possible, before doing unnecessary initialization work. For some app types, initialization logic runs on an STA thread, which must not be blocked. **AppInstance.RedirectActivationToAsync** method is asynchronous, and the calling app must wait for the method to complete, otherwise the redirection will fail. However, waiting on an async call will block the STA. In these situations, call **RedirectActivationToAsync** in another thread, and set an event when the call completes. Then wait on that event using non-blocking APIs.
Copy file name to clipboardExpand all lines: hub/powertoys/hosts-file-editor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,8 @@ From the Settings menu, the following options can be configured:
45
45
| :--- | :--- |
46
46
| Open as administrator | Open as administrator to be able edit the hosts file. If disabled, the editor is run in read-only mode. Hosts File Editor is started as administrator by default. |
47
47
| Show a warning at startup | Warns that editing hosts can change DNS names resolution. Enabled by default. |
48
-
| Placement of additional content | Default value is **Top**. If **Bottom** is selected, the file header is moved below hosts settings to the bottom. |
49
-
| Consider loopback addresses as duplicates |Loopback addresses (like 127.0.0.1 and ::1) are considered as duplicates. |
48
+
| Placement of additional content |Determines where new host entries are added in the hosts file. Default value is **Top** (new entries are added near the top of the file after the default Windows header comments). If **Bottom** is selected, new entries are added at the end of the file. This affects the organization of your hosts file and can impact which entries take precedence if there are conflicts. |
49
+
| Consider loopback addresses as duplicates |When enabled, multiple loopback addresses (127.0.0.1, ::1) pointing to the same hostname are treated as duplicates. This prevents adding redundant entries and helps avoid conflicts. When disabled, you can add multiple loopback entries for the same hostname, which may be useful for testing different network configurations but could lead to unexpected behavior. |
50
50
| Encoding | Default value is **UTF-8**. If **UTF-8 with BOM** is selected, a Byte Order Mark (BOM) is included at the start of the file. |
0 commit comments