diff --git a/docs/high-performance/Memory2D.md b/docs/high-performance/Memory2D.md index 6d44f4a87..2a237c3aa 100644 --- a/docs/high-performance/Memory2D.md +++ b/docs/high-performance/Memory2D.md @@ -40,7 +40,7 @@ This configuration allows `Memory2D` to be extremely flexible in the way it m - A 2D `T[,]` array, mapped directly to a `Memory2D` instance. - A 3D `T[,,]` array, with a `Memory2D` instance representing a given depth slice (a layer). -The `Memory` type also exposes a number of utility methods, including most of the same API surface that the standard `Memory` implements. For instance, it includes a `Slice(int, int)` method that makes it easy to do 2D slicing operations directly on the virtual 2D memory location, with the `Memory2D` instance automatically adjusting the necessary parameters internally to shift its mapping on the right memory area(s) corresponding to the requested result. +The `Memory2D` type also exposes a number of utility methods, including most of the same API surface that the standard `Memory` implements. For instance, it includes a `Slice(int, int)` method that makes it easy to do 2D slicing operations directly on the virtual 2D memory location, with the `Memory2D` instance automatically adjusting the necessary parameters internally to shift its mapping on the right memory area(s) corresponding to the requested result. ## Syntax diff --git a/docs/high-performance/ParallelHelper.md b/docs/high-performance/ParallelHelper.md index 568d6ae65..95a034cdf 100644 --- a/docs/high-performance/ParallelHelper.md +++ b/docs/high-performance/ParallelHelper.md @@ -11,7 +11,7 @@ dev_langs: The [`ParallelHelper`](/dotnet/api/microsoft.toolkit.highperformance.helpers.parallelhelper) contains high performance APIs to work with parallel code. It contains performance oriented methods that can be used to quickly setup and execute parallel operations over a given data set or iteration range or area. -> **Platform APIs:** [`ParallelHelper`](/dotnet/api/microsoft.toolkit.highperformance.helpers.parallelhelper), [`IAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IAction), [`IAction2D`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IAction2D), [`IRefAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IRefAction-1), [`IInAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IInAction-1) +> **Platform APIs:** [`ParallelHelper`](/dotnet/api/microsoft.toolkit.highperformance.helpers.parallelhelper), [`IAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IAction), [`IAction2D`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IAction2D), [`IRefAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IRefAction-1), [`IInAction`](/dotnet/api/microsoft.toolkit.highperformance.helpers.IInAction-1) ## How it works diff --git a/docs/high-performance/Span2D.md b/docs/high-performance/Span2D.md index af78216e7..764767d5b 100644 --- a/docs/high-performance/Span2D.md +++ b/docs/high-performance/Span2D.md @@ -31,7 +31,7 @@ Span2D span = array; // The memory directly maps the 2*3 array here span[0, 0] = 10; -span[2, 1] = 20; +span[1, 1] = 20; // The array is now: // { 10, 2, 3 }, diff --git a/docs/high-performance/SpanOwner.md b/docs/high-performance/SpanOwner.md index 6c7e9095d..d19b54805 100644 --- a/docs/high-performance/SpanOwner.md +++ b/docs/high-performance/SpanOwner.md @@ -62,7 +62,7 @@ Span span = buffer.Span; The `SpanOwner` instance will internally rent an array, and will take care of returning it to the pool when it goes out of scope. We no longer need to use a `try/finally` block either, as the C# compiler will add that automatically when expanding that `using` statement. As such, the `SpanOwner` type can be seen as a lightweight wrapper around the `ArrayPool` APIs, which makes them both more compact and easier to use, reducing the amount of code that needs to be written to properly rent and dispose short lived buffers. You can see how using `SpanOwner` makes the code much shorter and more straightforward. > [!NOTE] -> As this is a stack-only type, it relies on the duck-typed `IDisposable` pattern introduced with C# 8. That is shown in the sample above: the `SpanOwner` type is being used within a `using` block despite the fact that the type doesn't implement the `IDisposable` interface at all, and it's also never boxed. The functionality is just the same: as soon as the buffer goes out of scope, it is automatically disposed. The APIs in `SpanOwner{T}` rely on this pattern for extra performance: they assume that the underlying buffer will never be disposed as long as the `SpanOwner` type is in scope, and they don't perform the additional checks that are done in `MemoryOwner` to ensure that the buffer is in fact still available before returning a `Memory` or `Span` instance from it. As such, this type should always be used with a `using` block or expression. Not doing so will cause the underlying buffer not to be returned to the shared pool. Technically the same can also be achieved by manually calling `Dispose` on the `SpanOwner` type (which doesn't require C# 8), but that is error prone and hence not recommended. +> As this is a stack-only type, it relies on the duck-typed `IDisposable` pattern introduced with C# 8. That is shown in the sample above: the `SpanOwner` type is being used within a `using` block despite the fact that the type doesn't implement the `IDisposable` interface at all, and it's also never boxed. The functionality is just the same: as soon as the buffer goes out of scope, it is automatically disposed. The APIs in `SpanOwner` rely on this pattern for extra performance: they assume that the underlying buffer will never be disposed as long as the `SpanOwner` type is in scope, and they don't perform the additional checks that are done in `MemoryOwner` to ensure that the buffer is in fact still available before returning a `Memory` or `Span` instance from it. As such, this type should always be used with a `using` block or expression. Not doing so will cause the underlying buffer not to be returned to the shared pool. Technically the same can also be achieved by manually calling `Dispose` on the `SpanOwner` type (which doesn't require C# 8), but that is error prone and hence not recommended. ## Examples diff --git a/docs/maui/TOC.yml b/docs/maui/TOC.yml index 7582d6255..8e7ed25d2 100644 --- a/docs/maui/TOC.yml +++ b/docs/maui/TOC.yml @@ -243,6 +243,10 @@ items: href: views/Popup.md - name: "Popup Service" href: views/popup-service.md + - name: "Customizing Popup behavior and appearance" + href: views/popup/popup-options.md + - name: "Returning a value from a Popup" + href: views/popup/popup-result.md - name: SemanticOrderView href: views/semantic-order-view.md - name: C# Markup diff --git a/docs/maui/behaviors/animation-behavior.md b/docs/maui/behaviors/animation-behavior.md index d1add7ae4..269e3b597 100644 --- a/docs/maui/behaviors/animation-behavior.md +++ b/docs/maui/behaviors/animation-behavior.md @@ -7,7 +7,7 @@ ms.date: 09/16/2022 # AnimationBehavior -The `AnimationBehavior` is a `Behavior` that provides the ability to animate any `VisualElement` it is attached to. By default a `TapGestureRecognizer` is attached to the `VisualElement` and triggers the associated animation when that recognizer detects that the user has tapped or clicked on the `VisualElement`. +The `AnimationBehavior` is a `Behavior` that provides the ability to animate any `VisualElement` it is attached to. Setting `AnimateOnTap` to `true` adds a `TapGestureRecognizer` to the `VisualElement` and triggers the associated animation when that recognizer detects that the user has tapped or clicked on the `VisualElement`. The `AnimationType` property is required to be set, possible options for this can be found at [Animations](../animations/index.md). @@ -35,7 +35,7 @@ The following examples show how to add the `AnimationBehavior` to a `Label` and