From 06a60377d6438047f43a1d917808b3d6a200a791 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 26 Mar 2020 09:26:59 +0100 Subject: [PATCH 1/3] add clip to bounds documentation --- docs/extensions/UIElementExtensions.md | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/extensions/UIElementExtensions.md diff --git a/docs/extensions/UIElementExtensions.md b/docs/extensions/UIElementExtensions.md new file mode 100644 index 000000000..77d2d8daf --- /dev/null +++ b/docs/extensions/UIElementExtensions.md @@ -0,0 +1,55 @@ +--- +title: UIElement Extensions +author: vgromfeld +description: UIElementExtensions provides a simple way to extend the UIElement +keywords: windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, UIElement, extensions +--- + +# UIElement Extensions + +`UIElementExtensions` provides helpers for `UIElement`. + +## ClipToBounds + +The `ClipToBounds` property allows you to indicate whether to clip the content of this element (or content coming from the child elements of this element) to fit into the size of the containing element. + +> [!div class="nextstepaction"] +> [Try it in the sample app](uwpct://Extensions?sample=ClipToBounds) + +### Example + +```xaml + + + + + + + + + + + + + + +``` + +## Requirements (Windows 10 Device Family) + +| [Device family](http://go.microsoft.com/fwlink/p/?LinkID=526370) | Universal, 10.0.16299.0 or higher | +| --- | --- | +| Namespace | Microsoft.Toolkit.Uwp.UI.Extensions | + +## API + +- [UIElementExtensions source code](https://github.com/Microsoft/WindowsCommunityToolkit//blob/master/Microsoft.Toolkit.Uwp.UI/Extensions/UIElement) + +## Related Topics + +- [UIElement.ClipToBounds Property (WPF)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.uielement.cliptobounds?view=netframework-4.8) \ No newline at end of file From 6964c2d273b332d8366661b49067e17bd748da28 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 1 Apr 2020 22:08:21 +0200 Subject: [PATCH 2/3] add missing link Co-Authored-By: Michael Hawker MSFT (XAML Llama) --- docs/extensions/UIElementExtensions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/extensions/UIElementExtensions.md b/docs/extensions/UIElementExtensions.md index 77d2d8daf..a8bbc5331 100644 --- a/docs/extensions/UIElementExtensions.md +++ b/docs/extensions/UIElementExtensions.md @@ -45,6 +45,7 @@ The `ClipToBounds` property allows you to indicate whether to clip the content o | [Device family](http://go.microsoft.com/fwlink/p/?LinkID=526370) | Universal, 10.0.16299.0 or higher | | --- | --- | | Namespace | Microsoft.Toolkit.Uwp.UI.Extensions | +| NuGet package | [Microsoft.Toolkit.Uwp.UI](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.UI/) | ## API @@ -52,4 +53,4 @@ The `ClipToBounds` property allows you to indicate whether to clip the content o ## Related Topics -- [UIElement.ClipToBounds Property (WPF)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.uielement.cliptobounds?view=netframework-4.8) \ No newline at end of file +- [UIElement.ClipToBounds Property (WPF)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.uielement.cliptobounds?view=netframework-4.8) From fcc4d353901f4d194f4cdfed56019343a0dd56e9 Mon Sep 17 00:00:00 2001 From: Ze Groumf Date: Wed, 1 Apr 2020 22:17:46 +0200 Subject: [PATCH 3/3] add API doc link + update toc --- docs/extensions/UIElementExtensions.md | 2 +- docs/toc.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/extensions/UIElementExtensions.md b/docs/extensions/UIElementExtensions.md index a8bbc5331..63a9c28a5 100644 --- a/docs/extensions/UIElementExtensions.md +++ b/docs/extensions/UIElementExtensions.md @@ -7,7 +7,7 @@ keywords: windows 10, uwp, windows community toolkit, uwp community toolkit, uwp # UIElement Extensions -`UIElementExtensions` provides helpers for `UIElement`. +The [UIElementExtensions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.ui.extensions.uielementextensions) provide helpers for `UIElement`. ## ClipToBounds diff --git a/docs/toc.md b/docs/toc.md index 1c9c0cf54..48cd37d2e 100644 --- a/docs/toc.md +++ b/docs/toc.md @@ -111,6 +111,7 @@ ## [SurfaceDialTextboxHelper](extensions/SurfaceDialTextboxHelper.md) ## [TextBoxMask](extensions/TextBoxMask.md) ## [TextBoxRegex](extensions/TextBoxRegex.md) +## [UIElementExtensions](extensions/UIElementExtensions.md) ## [ViewExtensions](extensions/ViewExtensions.md) ## [Visual Tree](extensions/VisualTree.md) ## [WebViewExtensions](extensions/WebViewExtensions.md)