diff --git a/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedBehavior.shared.cs b/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedBehavior.shared.cs index 0133c6d67..11a993787 100644 --- a/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedBehavior.shared.cs +++ b/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedBehavior.shared.cs @@ -7,20 +7,35 @@ namespace Xamarin.CommunityToolkit.Behaviors { + /// + /// The is a behavior that allows the user to trigger an action when a user has reached the maximum length allowed on an . It can either trigger a or an event depending on the user's preferred scenario. + /// public class MaxLengthReachedBehavior : BaseBehavior { + /// + /// Backing BindableProperty for the property. + /// public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(MaxLengthReachedBehavior)); + /// + /// Command that is triggered when the value configured in is reached. Both the event and this command are triggered. This is a bindable property. + /// public ICommand Command { get => (ICommand)GetValue(CommandProperty); set => SetValue(CommandProperty, value); } + /// + /// Backing BindableProperty for the property. + /// public static readonly BindableProperty ShouldDismissKeyboardAutomaticallyProperty = BindableProperty.Create(nameof(ShouldDismissKeyboardAutomatically), typeof(bool), typeof(MaxLengthReachedBehavior), false); + /// + /// Indicates whether or not the keyboard should be dismissed automatically after the maximum length is reached. This is a bindable property. + /// public bool ShouldDismissKeyboardAutomatically { get => (bool)GetValue(ShouldDismissKeyboardAutomaticallyProperty); @@ -29,6 +44,9 @@ public bool ShouldDismissKeyboardAutomatically readonly WeakEventManager maxLengthReachedEventManager = new WeakEventManager(); + /// + /// Event that is triggered when the value configured in is reached. Both the and this event are triggered. This is a bindable property. + /// public event EventHandler MaxLengthReached { add => maxLengthReachedEventManager.AddEventHandler(value); diff --git a/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedEventArgs.shared.cs b/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedEventArgs.shared.cs index 3734d6e7a..7cdd68bb2 100644 --- a/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedEventArgs.shared.cs +++ b/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/MaxLengthReachedEventArgs.shared.cs @@ -2,10 +2,20 @@ namespace Xamarin.CommunityToolkit.Behaviors { + /// + /// Container object for the event arguments that are provided when the event is triggered. + /// public class MaxLengthReachedEventArgs : EventArgs { + /// + /// The new text value as determined by the + /// public string Text { get; } + /// + /// Constructor to create a new instance of . + /// + /// The new text value as determined by the public MaxLengthReachedEventArgs(string text) => Text = text; }