Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions hub/apps/develop/feeds/implement-feed-provider-win32.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ namespace winrt

The **OnFeedProviderEnabled** method is invoked when a feed associated with the provider is created by the Widgets Board host. In the implementation of this method, generate a query string with the parameters that will be passed to the URL that provides the feed content, including any necessary authentication tokens. Create an instance of **CustomQueryParametersUpdateOptions**, passing in the **FeedProviderDefinitionId** from the event args that identifies the feed that has been enabled and the query string. Get the default **FeedManager** and call **SetCustomQueryParameters** to register the query string parameters with the Widgets Board.

```csharp
// FeedProvider.cs
```cpp
// FeedProvider.cpp
void FeedProvider::OnFeedProviderEnabled(winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs args)
{
std::wstringstream wstringstream;
Expand All @@ -155,8 +155,8 @@ wstringstream << args.FeedProviderDefinitionId().c_str() << L" feed provider was

**OnFeedProviderDisabled** is called when the Widgets Board when all of the feeds for this provider have been disabled. Feed providers are not required to perform any actions in response to these this method call. The method invocation can be used for telemetry purposes or to update the query string parameters or revoke authentication tokens, if needed. If the app only supports a single feed provider or if all feed providers supported by the app have been disabled, then the app can exit in response to this callback.

```csharp
// FeedProvider.cs
```cpp
// FeedProvider.cpp

void FeedProvider::OnFeedProviderDisabled(winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs args)
{
Expand All @@ -170,8 +170,8 @@ void FeedProvider::OnFeedProviderDisabled(winrt::Microsoft::Windows::Widgets::Fe

**OnFeedEnabled** and **OnFeedDisabled** are invoked by the Widgets Board when a feed is enabled or disabled. Feed providers are not required to perform any actions in response to these method calls. The method invocation can be used for telemetry purposes or to update the query string parameters or revoke authentication tokens, if needed.

```csharp
// FeedProvider.cs
```cpp
// FeedProvider.cpp

void FeedProvider::OnFeedEnabled(winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs args)
{
Expand All @@ -181,8 +181,8 @@ void FeedProvider::OnFeedEnabled(winrt::Microsoft::Windows::Widgets::Feeds::Prov
}
```

```csharp
// FeedProvider.cs
```cpp
// FeedProvider.cpp

void FeedProvider::OnFeedDisabled(winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs args)
{
Expand All @@ -196,8 +196,8 @@ void FeedProvider::OnFeedDisabled(winrt::Microsoft::Windows::Widgets::Feeds::Pro

**OnCustomQueryParametersRequested** is raised when the Widgets Board determines that the custom query parameters associated with the feed provider need to be refreshed. For example, this method may be raised if the operation to fetch feed content from the remote web service fails. The **FeedProviderDefinitionId** property of the **CustomQueryParametersRequestedArgs** passed into this method specifies the feed for which query string params are being requested. The provider should regenerate the query string and pass it back to the Widgets Board by calling **SetCustomQueryParameters**.

```csharp
// FeedProvider.cs
```cpp
// FeedProvider.cpp

void FeedProvider::OnCustomQueryParametersRequested(winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs args)
{
Expand Down
4 changes: 2 additions & 2 deletions hub/apps/develop/security/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ navigator.credentials.get({
rpId: ...,
allowCredentials: [{
type: "public-key",
id: new UInt8Array([21, 31, 56, ...]).buffer,
id: new Uint8Array([21, 31, 56, ...]).buffer,
}, {
type: "public-key",
id: new UInt8Array([21, 31, 56, ...]).buffer,
id: new Uint8Array([21, 31, 56, ...]).buffer,
}, {
...
}],
Expand Down
10 changes: 1 addition & 9 deletions hub/apps/develop/ui/controls/commanding.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,6 @@ If you need to create a command that isn't defined by the [StandardUICommand](/w

*XamlUICommandSample*

| Download the code for this example |
| -------------------- |
| [WinUI commanding sample (XamlUICommand)](https://github.com/MicrosoftDocs/windows-topic-specific-samples/archive/uwp-commanding-xamluicommand.zip) |
| Download the code for this example |
| -------------------- |
| [Commanding sample (XamlUICommand)](https://github.com/MicrosoftDocs/windows-topic-specific-samples/archive/uwp-commanding-xamluicommand.zip) |
Expand Down Expand Up @@ -609,7 +606,7 @@ The most basic way to support a structured commanding experience is to define an

> [!NOTE]
> In some cases, it might be just as efficient to bind a method to the Click event and a property to the IsEnabled property.
Standard WinUI controls (button, list, selection, calendar, predictive text) provide the basis for many common command experiences. For a complete list of control types, see [Controls and patterns for Windows apps](../../../design/controls/index.md).

#### Example

![Command interface example](images/commanding/icommand.gif)
Expand All @@ -622,10 +619,6 @@ Standard WinUI controls (button, list, selection, calendar, predictive text) pro

In this basic example, we demonstrate how a single command can be invoked with a button click, a keyboard accelerator, and rotating a mouse wheel.

| Download the code for this example |
| -------------------- |
| [Commanding sample (ICommand)](https://github.com/MicrosoftDocs/windows-topic-specific-samples/archive/uwp-commanding-icommand.zip) |

```xaml
<Page
x:Class="UICommand1.View.MainPage"
Expand Down Expand Up @@ -1080,7 +1073,6 @@ Use the following approaches when building commands for your Windows apps:

- Listen for and handle events in XAML/code-behind
- Bind to an event handling method such as Click
WinUI provides a robust and flexible commanding system that lets you build apps that share and manage commands across control types, devices, and input types.
- Create XamlUICommand objects with your own values for a pre-defined set of properties
- Create StandardUICommand objects with a set of pre-defined platform properties and values

Expand Down