Skip to content

Commit b420c9e

Browse files
Add more xmldoc comments for AdornerLayer and AdornerDecorator
1 parent bcdc3f3 commit b420c9e

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

components/Adorners/src/AdornerDecorator.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,35 @@ public sealed partial class AdornerDecorator : Control
1313
{
1414
private const string PartAdornerLayer = "AdornerLayer";
1515

16+
/// <summary>
17+
/// Gets or sets the single child element of the <see cref="AdornerDecorator"/>.
18+
/// </summary>
1619
public UIElement Child
1720
{
1821
get { return (UIElement)GetValue(ContentProperty); }
1922
set { SetValue(ContentProperty, value); }
2023
}
2124

22-
// Using a DependencyProperty as the backing store for Content. This enables animation, styling, binding, etc...
25+
/// <summary>
26+
/// Identifies the <see cref="Child"/> dependency property.
27+
/// </summary>
2328
public static readonly DependencyProperty ContentProperty =
2429
DependencyProperty.Register(nameof(Child), typeof(UIElement), typeof(AdornerDecorator), new PropertyMetadata(null));
2530

26-
public AdornerLayer? AdornerLayer { get; private set; }
31+
/// <summary>
32+
/// Gets the <see cref="AdornerLayer"/> contained within this <see cref="AdornerDecorator"/>.
33+
/// </summary>
34+
internal AdornerLayer? AdornerLayer { get; private set; }
2735

36+
/// <summary>
37+
/// Constructs a new instance of <see cref="AdornerDecorator"/>.
38+
/// </summary>
2839
public AdornerDecorator()
2940
{
3041
this.DefaultStyleKey = typeof(AdornerDecorator);
3142
}
3243

44+
/// <inheritdoc/>
3345
protected override void OnApplyTemplate()
3446
{
3547
base.OnApplyTemplate();

components/Adorners/src/AdornerLayer.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
namespace CommunityToolkit.WinUI;
88

99
/// <summary>
10-
/// An adornment layer which can hold content to show on top of other components. If none is specified, one will be injected into your app content for you.
10+
/// An adornment layer which can hold content to show on top of other components.
11+
/// If none is specified, one will be injected into your app content for you.
12+
/// If a suitable location can't be automatically found, you can also use an
13+
/// <see cref="AdornerDecorator"/> to specify where the <see cref="AdornerLayer"/> should be placed.
1114
/// </summary>
1215
public partial class AdornerLayer : Canvas
1316
{
17+
/// <summary>
18+
/// Gets the <see cref="XamlProperty"/> of a <see cref="FrameworkElement"/>. Use this to retrieve any attached <see cref="UIElement"/> adorner from another <see cref="FrameworkElement"/>.
19+
/// </summary>
20+
/// <param name="obj">The <see cref="FrameworkElement"/> to retrieve the adorner from.</param>
21+
/// <returns>The <see cref="UIElement"/> attached as an adorner.</returns>
1422
public static UIElement GetXaml(FrameworkElement obj)
1523
{
1624
return (UIElement)obj.GetValue(XamlProperty);
@@ -32,6 +40,9 @@ public static void SetXaml(FrameworkElement obj, UIElement value)
3240
public static readonly DependencyProperty XamlProperty =
3341
DependencyProperty.RegisterAttached("Xaml", typeof(UIElement), typeof(AdornerLayer), new PropertyMetadata(null, OnXamlPropertyChanged));
3442

43+
/// <summary>
44+
/// Constructs a new instance of <see cref="AdornerLayer"/>.
45+
/// </summary>
3546
public AdornerLayer()
3647
{
3748
SizeChanged += AdornerLayer_SizeChanged;
@@ -248,7 +259,9 @@ private static void RemoveAdorner(AdornerLayer layer, UIElement adorner)
248259
{
249260
layer.Children.Remove(border);
250261

262+
#if !HAS_UNO
251263
VisualTreeHelper.DisconnectChildrenRecursive(border);
264+
#endif
252265
}
253266
}
254267
}

components/Adorners/src/Helpers/FrameworkElementExtensions.WaitUntilLoaded.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace CommunityToolkit.WinUI.Future;
66

7+
/// <summary>
8+
/// Helper extensions for <see cref="FrameworkElement"/>.
9+
/// </summary>
710
public static partial class FrameworkElementExtensions
811
{
912
/// <summary>

0 commit comments

Comments
 (0)