Skip to content

Commit 0c95a90

Browse files
committed
Add XML doc to new public interfaces
1 parent fb4759a commit 0c95a90

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
#nullable disable
22
namespace Microsoft.Maui.Controls
33
{
4+
5+
/// <summary>
6+
/// Defines a contract for objects that can be attached to a <see cref="BindableObject"/>.
7+
/// This interface is typically implemented by behaviors or effects that need to interact with
8+
/// the lifecycle or properties of a visual element in the UI.
9+
/// </summary>
410
public interface IAttachedObject
511
{
12+
13+
/// <summary>
14+
/// Attaches the object to the specified <see cref="BindableObject"/>.
15+
/// This method is called when the object is added to the visual tree.
16+
/// </summary>
17+
/// <param name="bindable">The <see cref="BindableObject"/> to attach to.</param>
618
void AttachTo(BindableObject bindable);
19+
20+
/// <summary>
21+
/// Detaches the object from the specified <see cref="BindableObject"/>.
22+
/// This method is called when the object is removed from the visual tree.
23+
/// </summary>
24+
/// <param name="bindable">The <see cref="BindableObject"/> to detach from.</param>
725
void DetachFrom(BindableObject bindable);
826
}
927
}

src/Controls/src/Core/Interactivity/IBehavior.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33

44
namespace Microsoft.Maui.Controls
55
{
6+
7+
/// <summary>
8+
/// Represents a behavior that can be attached to a <see cref="BindableObject"/>.
9+
/// </summary>
610
public interface IBehavior : INotifyPropertyChanged, IAttachedObject
711
{
812
}
913

14+
/// <summary>
15+
/// Represents a behavior that can be attached to a specific type of <see cref="BindableObject"/>.
16+
/// This generic interface allows behaviors to be strongly typed to the target element.
17+
/// </summary>
18+
/// <typeparam name="T">The type of <see cref="BindableObject"/> the behavior can attach to.</typeparam>
1019
public interface IBehavior<T> : IBehavior where T : BindableObject
1120
{
1221
}

0 commit comments

Comments
 (0)