diff --git a/components/Extensions/samples/FrameworkElementAncestorSample.xaml b/components/Extensions/samples/FrameworkElementAncestorSample.xaml new file mode 100644 index 00000000..62322a79 --- /dev/null +++ b/components/Extensions/samples/FrameworkElementAncestorSample.xaml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/components/Extensions/samples/FrameworkElementAncestorSample.xaml.cs b/components/Extensions/samples/FrameworkElementAncestorSample.xaml.cs new file mode 100644 index 00000000..e8038428 --- /dev/null +++ b/components/Extensions/samples/FrameworkElementAncestorSample.xaml.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace ExtensionsExperiment.Samples; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +[ToolkitSample(id: nameof(FrameworkElementAncestorSample), nameof(FrameworkElementAncestorSample), description: $"A sample for showing how to use the FrameworkElementExtensions.Ancestor attached property.")] +public sealed partial class FrameworkElementAncestorSample : Page +{ + public FrameworkElementAncestorSample() + { + this.InitializeComponent(); + } +} diff --git a/components/Extensions/samples/FrameworkElementExtensions.md b/components/Extensions/samples/FrameworkElementExtensions.md index 6990a932..a6f9358a 100644 --- a/components/Extensions/samples/FrameworkElementExtensions.md +++ b/components/Extensions/samples/FrameworkElementExtensions.md @@ -102,11 +102,9 @@ The `AncestorType` attached property will walk the visual tree from the attached Here is an example of how this can be used: -```xaml -