diff --git a/docs/extensions/UIElementExtensions.md b/docs/extensions/UIElementExtensions.md new file mode 100644 index 000000000..63a9c28a5 --- /dev/null +++ b/docs/extensions/UIElementExtensions.md @@ -0,0 +1,56 @@ +--- +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 + +The [UIElementExtensions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.ui.extensions.uielementextensions) provide 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 | +| NuGet package | [Microsoft.Toolkit.Uwp.UI](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.UI/) | + +## 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) 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)