Skip to content
Open
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
2 changes: 1 addition & 1 deletion hub/apps/design/layout/attached-layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ The snippet below shows the additional logic that could be added to the MeasureO

for (int i = state.LastRealizedIndex; i < newLastRealizedIndex; i++)
{
context.RecycleElement(context.IndexElementMap.Get(i));
context.RecycleElement(state.IndexToElementMap.Get(i));
state.IndexToElementMap.Clear(i);
}

Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/dispatcherqueue.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void RunCustomMessageLoop()
{
if (!ContentPreTranslateMessage(&msg))
{
TranslateMesasge(&msg);
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/input/focus-navigation-programmatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Here, we show how to specify that the buttons of a CommandBar have a wrap-around
```csharp
private void OnLosingFocus(UIElement sender, LosingFocusEventArgs args)
{
if (IsNotAChildOf(MyCommandBar, args.NewFocussedElement))
if (IsNotAChildOf(MyCommandBar, args.NewFocusedElement))
{
DependencyObject candidate = null;
if (args.Direction == FocusNavigationDirection.Left)
Expand Down
145 changes: 65 additions & 80 deletions hub/apps/develop/input/handle-pointer-input.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void MainPage::DefaultLaunch()
{
auto installFolder = Windows::ApplicationModel::Package::Current->InstalledLocation;

concurrency::task<Windows::Storage::StorageFile^getFileOperation(installFolder->GetFileAsync("images\\test.png"));
concurrency::task<Windows::Storage::StorageFile^> getFileOperation(installFolder->GetFileAsync("images\\test.png"));
getFileOperation.then([](Windows::Storage::StorageFile^ file)
{
if (file != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/motion/motion-in-practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ There may be times when the system does not yet provide an exact motion solution
:::row:::
:::column:::
<b>Direction Forward Out:</b><br>
Fade out: 150m; Easing: Default Accelerate
Fade out: 150ms; Easing: Default Accelerate
<b>Direction Forward In:</b><br>
Slide up 150px: 300ms; Easing: Default Decelerate
:::column-end:::
Expand Down
1 change: 1 addition & 0 deletions hub/apps/develop/motion/parallax.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ This example creates a parallax effect for a list:
<x:String>Item 9</x:String>
<x:String>Item 10</x:String>
<x:String>Item 11</x:String>
<x:String>Item 12</x:String>
<x:String>Item 13</x:String>
<x:String>Item 14</x:String>
<x:String>Item 15</x:String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ The images you use in your app notification can be sourced from...

For http and https remote web images, there are limits on the file size of each individual image. The limit is 3 MB on normal connections and 1 MB on metered connections.

| Normal connection | Metered connection |
| - | - |
| Normal connection | Metered connection |
| - | - |
| 3 MB | 1 MB |

If an image exceeds the file size, or fails to download, or times out, the image will be dropped and the rest of the notification will be displayed.
Expand All @@ -239,7 +239,7 @@ On older versions of Windows that don't support attribution text, the text will
var builder = new AppNotificationBuilder()
.AddText("Marry Anne")
.AddText("Check out where we camped last night!")
.SetAttributionText("via SMS");
.SetAttributionText("via SMS")
.SetHeroImage(new Uri("ms-appx:///Images/HeroImage.png"));
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This table summarizes the notification delivery types.
<td align="left"><ul>
<li>A music app updates its tile to show what's &quot;Now Playing&quot;.</li>
<li>A game app updates its tile with the user's high score when the user leaves the game.</li>
<li>A badge whose glyph indicates that there's new info int the app is cleared when the app is activated.</li>
<li>A badge whose glyph indicates that there's new info in the app is cleared when the app is activated.</li>
</ul></td>
</tr>
<tr class="even">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ request.AddHeader("Content-Type", "application/octet-stream");
request.AddHeader("X-WNS-Type", "wns/raw");
request.AddHeader("Authorization", "Bearer [your access token]");
request.AddBody("Notification body");
RestResponse response = await client.ExecutePostAsync(request);");
RestResponse response = await client.ExecutePostAsync(request);
```

### Step 3: Send a cloud-sourced app notification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ As with **StaticResource**, a **ThemeResource** must not attempt to make a forwa

Attempting to specify a **ThemeResource** to a key that cannot resolve throws a XAML parse exception at run time. Design tools may also offer warnings or errors.

In the Windows Runtime XAML processor implementation, there is no backing class representation for **ThemeResource**. The closest equivalent in code is to use the collection API of a [**ResourceDictionary**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.ResourceDictionary), for example calling **Contains** or **TryGetValue*.
In the Windows Runtime XAML processor implementation, there is no backing class representation for **ThemeResource**. The closest equivalent in code is to use the collection API of a [**ResourceDictionary**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.ResourceDictionary), for example calling **Contains** or **TryGetValue**.

**ThemeResource** is a markup extension. Markup extensions are typically implemented when there is a requirement to escape attribute values to be other than literal values or handler names, and the requirement is more global than just putting type converters on certain types or properties. All markup extensions in XAML use the "{" and "}" characters in their attribute syntax, which is the convention by which a XAML processor recognizes that a markup extension must process the attribute.

Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/security/third-party.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Windows 11 supports a plugin model for passkeys. Contoso Passkey Manager is a de

### Step 4: Passkey authentication

1. Use the passkey autofill drop down and you will be prompted to complete user verificaition to sign in with you passkey saved to the Contoso Passkey Manager.
1. Use the passkey autofill drop down and you will be prompted to complete user verification to sign in with you passkey saved to the Contoso Passkey Manager.

![A screenshot of authentication with a Contoso Passkey Manager passkey](images/authentication-contoso-passkey-manager.png)

Expand Down
4 changes: 2 additions & 2 deletions hub/apps/develop/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ namespace WinUITest1
11. Open the UserControl1.xaml.cs code-behind file. For this example, we add a new public method called `GetSeven` that simply returns an integer.

```csharp
namespace WinUICLassLibrary1
namespace WinUIClassLibrary1
{
public sealed partial class UserControll : UserControl
public sealed partial class UserControl1 : UserControl
{
public UserControl1()
{
Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/ui/controls/animated-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private void Button_PointerEntered(object sender, PointerRoutedEventArgs e)

private void Button_PointerExited(object sender, PointerRoutedEventArgs e)
{
AnimatedIcon.SetState(this.StackPaAnimatedIcon1nel1, "Normal");
AnimatedIcon.SetState(this.AnimatedIcon1, "Normal");
}
```

Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/ui/controls/media-playback.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ For more complex media playback scenarios like playing a playlist, switching bet

Use the [Stretch](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaplayerelement.stretch) property to change how the video content and/or the [PosterSource](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaplayerelement.postersource) fills the container it's in. This resizes and stretches the video depending on the [Stretch](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) value. The `Stretch` states are similar to picture size settings on many TV sets. You can hook this up to a button and allow the user to choose which setting they prefer.

- [None](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) displays the native resolution of the content in its original size.This can result in some of the video being cropped or black bars at the edges of the video.
- [None](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) displays the native resolution of the content in its original size. This can result in some of the video being cropped or black bars at the edges of the video.
- [Uniform](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) fills up as much of the space as possible while preserving the aspect ratio and the video content. This can result in horizontal or vertical black bars at the edges of the video. This is similar to wide-screen modes.
- [UniformToFill](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) fills up the entire space while preserving the aspect ratio. This can result in some of the video being cropped. This is similar to full-screen modes.
- [Fill](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.stretch) fills up the entire space, but does not preserve the aspect ratio. None of video is cropped, but stretching may occur. This is similar to stretch modes.
Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/ui/controls/password-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For more info about choosing the right text control, see the [Text controls](../

- Use a label or placeholder text if the purpose of the password box isn't clear. A label is visible whether or not the text input box has a value. Placeholder text is displayed inside the text input box and disappears once a value has been entered.
- Give the password box an appropriate width for the range of values that can be entered. Word length varies between languages, so take localization into account if you want your app to be world-ready.
- Don't put another control right next to a password input box. The password box has a password reveal button for users to verify the passwords they have typed, and having another control right next to it might make users accidentally reveal their passwords when they try to interact with the other control. To prevent this from happening, put some spacing between the password in put box and the other control, or put the other control on the next line.
- Don't put another control right next to a password input box. The password box has a password reveal button for users to verify the passwords they have typed, and having another control right next to it might make users accidentally reveal their passwords when they try to interact with the other control. To prevent this from happening, put some spacing between the password input box and the other control, or put the other control on the next line.
- Consider presenting two password boxes for account creation: one for the new password, and a second to confirm the new password.
- Only show a single password box for logins.
- When a password box is used to enter a PIN, consider providing an instant response as soon as the last number is entered instead of using a confirmation button.
Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/ui/controls/scroll-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ private void ZoomSlider_ValueChanged(object sender, RangeBaseValueChangedEventAr
scrollViewer.ChangeView(
horizontalOffset: null,
verticalOffset: null,
zoomFactor: (float)e.NewValue));
zoomFactor: (float)e.NewValue);
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions hub/apps/develop/win2d/premultiplied-alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Win2D image effects use a mixture of straight and premultiplied alpha. Some effe

The bitmap APIs `GetPixelBytes`, `SetPixelBytes`, `GetPixelColors`, and `SetPixelColors`, do **not** perform any alpha format conversions. They just directly transfer bit values to or from the underlying GPU texture. This allows you to observe what alpha format Win2D is using internally:
- Create a drawing session on a rendertarget
- Call `drawingSession.Clear(Colors.Tranparent)`
- `Colors.Tranparent` is defined as R = 255, G = 255, B = 255, A = 0
- Call `drawingSession.Clear(Colors.Transparent)`
- `Colors.Transparent` is defined as R = 255, G = 255, B = 255, A = 0
- Win2D will convert this value to premultiplied format, yielding R = 0, G = 0, B = 0, A = 0
- Use `GetPixelColors` to read back the contents of the rendertarget
- Observe that it contains premultiplied format RGB = 0, not RGB = 255 like the original straight alpha `Colors.Tranparent` value
- Observe that it contains premultiplied format RGB = 0, not RGB = 255 like the original straight alpha `Colors.Transparent` value

## Converting between alpha formats

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Every application is different, and it's up to Windows to understand the target

## Intent URIs

URIs allow you to launch another app to perform a specific task, enabling helpful app-to-app scenarios. For more infomation about launching apps using URIs, see [Launch the default Windows app for a URI](/windows/apps/develop/launch/launch-default-app) and [Create Deep Links to App Content | Android Developers](https://developer.android.com/training/app-links/deep-linking).
URIs allow you to launch another app to perform a specific task, enabling helpful app-to-app scenarios. For more information about launching apps using URIs, see [Launch the default Windows app for a URI](/windows/apps/develop/launch/launch-default-app) and [Create Deep Links to App Content | Android Developers](https://developer.android.com/training/app-links/deep-linking).

## Handling API responses in Windows

Expand Down
2 changes: 1 addition & 1 deletion hub/apps/develop/windows-integration/pin-to-taskbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The [TaskbarManager](/uwp/api/windows.ui.shell.taskbarmanager) class lets you as

### Win32

If you want to use `TaskbarManager` from your WIn32 desktop app, then you'll need to check whether desktop app support is present. You can look for the `ITaskbarManagerDesktopAppSupportStatics` marker interface on the `TaskbarManager` activation factory to perform this check. If this interface is not available, then you won't be able to use `TaskbarManager` from your desktop app.
If you want to use `TaskbarManager` from your Win32 desktop app, then you'll need to check whether desktop app support is present. You can look for the `ITaskbarManagerDesktopAppSupportStatics` marker interface on the `TaskbarManager` activation factory to perform this check. If this interface is not available, then you won't be able to use `TaskbarManager` from your desktop app.

```cpp
if (winrt::try_get_activation_factory<winrt::Windows::UI::Shell::TaskbarManager, winrt::Windows::UI::Shell::ITaskbarManagerDesktopAppSupportStatics>())
Expand Down
6 changes: 2 additions & 4 deletions hub/apps/develop/windows-integration/studio-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ private async void Button_Click(object sender, RoutedEventArgs e)
// Hard coded for this example, one can use DeviceInformation and/or
// MediaCapture VideoDeviceController.Id to get the symbolic link

string symlink = "\\?\USB#VID_04F2&PID_B6B6&MI_00#6&12293a26&1&0000#{e5323777-f976-4f5b-9b55-
b94699c46e44}\GLOBAL";
string symlink = "\\?\USB#VID_04F2&PID_B6B6&MI_00#6&12293a26&1&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\GLOBAL";

bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings:camera?cameraId=" +
Uri.EscapeDataString(symlink) ));
bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings:camera?cameraId=" + Uri.EscapeDataString(symlink) ));
}
```

Expand Down