Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Controls/src/Core/RefreshView/RefreshView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Microsoft.Maui.Controls
{
/// <summary>
/// Represents a view that provides pull-to-refresh functionality.
/// Represents a container that provides pull-to-refresh functionality for scrollable content.
/// </summary>
[ContentProperty(nameof(Content))]
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
Expand Down Expand Up @@ -83,7 +83,7 @@ public bool IsRefreshing


/// <summary>
/// Gets or sets the command to invoke when the view is refreshed.
/// Gets or sets the command to execute when a refresh is triggered.
/// </summary>
public ICommand Command
{
Expand All @@ -100,7 +100,7 @@ public ICommand Command
propertyChanged: CommandElement.OnCommandParameterChanged);

/// <summary>
/// Gets or sets the parameter to pass to the command.
/// Gets or sets the parameter to pass to the refresh command.
/// </summary>
public object CommandParameter
{
Expand Down
26 changes: 18 additions & 8 deletions src/Controls/src/Core/ScrollView/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void ContentSizeChanged(object sender, EventArgs e)
}

/// <summary>
/// Gets the size of the content.
/// Gets the size of the scrollable content.
/// </summary>
public Size ContentSize
{
Expand Down Expand Up @@ -269,14 +269,18 @@ public double ScrollY
private set { SetValue(ScrollYPropertyKey, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/ScrollView.xml" path="//Member[@MemberName='HorizontalScrollBarVisibility']/Docs/*" />
/// <summary>
/// Gets or sets the horizontal scroll bar visibility.
/// </summary>
public ScrollBarVisibility HorizontalScrollBarVisibility
{
get { return (ScrollBarVisibility)GetValue(HorizontalScrollBarVisibilityProperty); }
set { SetValue(HorizontalScrollBarVisibilityProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/ScrollView.xml" path="//Member[@MemberName='VerticalScrollBarVisibility']/Docs/*" />
/// <summary>
/// Gets or sets the vertical scroll bar visibility.
/// </summary>
public ScrollBarVisibility VerticalScrollBarVisibility
{
get { return (ScrollBarVisibility)GetValue(VerticalScrollBarVisibilityProperty); }
Expand All @@ -289,16 +293,18 @@ public ScrollBarVisibility VerticalScrollBarVisibility
/// </summary>
/// <remarks>
/// This property controls which edges of the scroll view should obey safe area insets.
/// Use SafeAreaRegions.None for edge-to-edge content, SafeAreaRegions.All to obey all safe area insets,
/// SafeAreaRegions.Container for content that flows under keyboard but stays out of bars/notch, or SafeAreaRegions.SoftInput for keyboard-aware behavior.
/// Use SafeAreaEdges.None for edge-to-edge content, SafeAreaEdges.All to obey all safe area insets,
/// SafeAreaEdges.Container for content that flows under keyboard but stays out of bars/notch, or SafeAreaEdges.SoftInput for keyboard-aware behavior.
/// </remarks>
public SafeAreaEdges SafeAreaEdges
{
get => (SafeAreaEdges)GetValue(SafeAreaElement.SafeAreaEdgesProperty);
set => SetValue(SafeAreaElement.SafeAreaEdgesProperty, value);
}

/// <include file="../../docs/Microsoft.Maui.Controls/ScrollView.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
/// <summary>
/// Initializes a new instance of the <see cref="ScrollView"/> class.
/// </summary>
public ScrollView()
{
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<ScrollView>>(() => new PlatformConfigurationRegistry<ScrollView>(this));
Expand All @@ -312,7 +318,9 @@ public IPlatformElementConfiguration<T, ScrollView> On<T>() where T : IConfigPla
return _platformConfigurationRegistry.Value.On<T>();
}

/// <include file="../../docs/Microsoft.Maui.Controls/ScrollView.xml" path="//Member[@MemberName='ScrollToAsync'][1]/Docs/*" />
/// <summary>
/// Scrolls to the specified position asynchronously.
/// </summary>
public Task ScrollToAsync(double x, double y, bool animated)
{
if (Orientation == ScrollOrientation.Neither)
Expand All @@ -325,7 +333,9 @@ public Task ScrollToAsync(double x, double y, bool animated)
return _scrollCompletionSource.Task;
}

/// <include file="../../docs/Microsoft.Maui.Controls/ScrollView.xml" path="//Member[@MemberName='ScrollToAsync'][2]/Docs/*" />
/// <summary>
/// Scrolls to the specified element asynchronously.
/// </summary>
public Task ScrollToAsync(Element element, ScrollToPosition position, bool animated)
{
if (Orientation == ScrollOrientation.Neither)
Expand Down
42 changes: 29 additions & 13 deletions src/Controls/src/Core/SearchBar/SearchBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="Type[@FullName='Microsoft.Maui.Controls.SearchBar']/Docs/*" />
/// <summary>
/// Represents a text entry control optimized for searching.
/// </summary>
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
public partial class SearchBar : InputView, ITextAlignmentElement, ISearchBarController, IElementConfiguration<SearchBar>, ICommandElement, ISearchBar
{
Expand All @@ -27,7 +29,7 @@ public partial class SearchBar : InputView, ITextAlignmentElement, ISearchBarCon
nameof(SearchCommandParameter), typeof(object), typeof(SearchBar), null,
propertyChanged: CommandElement.OnCommandParameterChanged);

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='TextProperty']/Docs/*" />
/// <summary>Bindable property for <see cref="InputView.Text"/>.</summary>
public new static readonly BindableProperty TextProperty = InputView.TextProperty;

/// <summary>Bindable property for <see cref="CancelButtonColor"/>.</summary>
Expand All @@ -36,10 +38,10 @@ public partial class SearchBar : InputView, ITextAlignmentElement, ISearchBarCon
/// <summary>Bindable property for <see cref="SearchIconColor"/>.</summary>
public static readonly BindableProperty SearchIconColorProperty = BindableProperty.Create(nameof(SearchIconColor), typeof(Color), typeof(SearchBar), default(Color));

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='PlaceholderProperty']/Docs/*" />
/// <summary>Bindable property for <see cref="InputView.Placeholder"/>.</summary>
public new static readonly BindableProperty PlaceholderProperty = InputView.PlaceholderProperty;

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='PlaceholderColorProperty']/Docs/*" />
/// <summary>Bindable property for <see cref="InputView.PlaceholderColor"/>.</summary>
public new static readonly BindableProperty PlaceholderColorProperty = InputView.PlaceholderColorProperty;

/// <inheritdoc cref="InputView.FontFamilyProperty"/>
Expand Down Expand Up @@ -71,10 +73,10 @@ public partial class SearchBar : InputView, ITextAlignmentElement, ISearchBarCon
/// <summary>Bindable property for <see cref="VerticalTextAlignment"/>.</summary>
public static readonly BindableProperty VerticalTextAlignmentProperty = TextAlignmentElement.VerticalTextAlignmentProperty;

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='TextColorProperty']/Docs/*" />
/// <summary>Bindable property for <see cref="InputView.TextColor"/>.</summary>
public new static readonly BindableProperty TextColorProperty = InputView.TextColorProperty;

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='CharacterSpacingProperty']/Docs/*" />
/// <summary>Bindable property for <see cref="InputView.CharacterSpacing"/>.</summary>
public new static readonly BindableProperty CharacterSpacingProperty = InputView.CharacterSpacingProperty;

readonly Lazy<PlatformConfigurationRegistry<SearchBar>> _platformConfigurationRegistry;
Expand All @@ -88,7 +90,9 @@ public ReturnType ReturnType
set => SetValue(ReturnTypeProperty, value);
}

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='CancelButtonColor']/Docs/*" />
/// <summary>
/// Gets or sets the color of the cancel button.
/// </summary>
public Color CancelButtonColor
{
get { return (Color)GetValue(CancelButtonColorProperty); }
Expand All @@ -103,28 +107,36 @@ public Color SearchIconColor
set { SetValue(SearchIconColorProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='HorizontalTextAlignment']/Docs/*" />
/// <summary>
/// Gets or sets the horizontal text alignment.
/// </summary>
public TextAlignment HorizontalTextAlignment
{
get { return (TextAlignment)GetValue(TextAlignmentElement.HorizontalTextAlignmentProperty); }
set { SetValue(TextAlignmentElement.HorizontalTextAlignmentProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='VerticalTextAlignment']/Docs/*" />
/// <summary>
/// Gets or sets the vertical text alignment.
/// </summary>
public TextAlignment VerticalTextAlignment
{
get { return (TextAlignment)GetValue(TextAlignmentElement.VerticalTextAlignmentProperty); }
set { SetValue(TextAlignmentElement.VerticalTextAlignmentProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='SearchCommand']/Docs/*" />
/// <summary>
/// Gets or sets the command to invoke when the search button is pressed.
/// </summary>
public ICommand SearchCommand
{
get { return (ICommand)GetValue(SearchCommandProperty); }
set { SetValue(SearchCommandProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='SearchCommandParameter']/Docs/*" />
/// <summary>
/// Gets or sets the parameter to pass to the search command.
/// </summary>
public object SearchCommandParameter
{
get { return GetValue(SearchCommandParameterProperty); }
Expand All @@ -133,7 +145,9 @@ public object SearchCommandParameter

public event EventHandler SearchButtonPressed;

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
/// <summary>
/// Initializes a new instance of the <see cref="SearchBar"/> class.
/// </summary>
public SearchBar()
{
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<SearchBar>>(() => new PlatformConfigurationRegistry<SearchBar>(this));
Expand Down Expand Up @@ -169,7 +183,9 @@ private void OnRequestedThemeChanged(object sender, AppThemeChangedEventArgs e)
void ICommandElement.CanExecuteChanged(object sender, EventArgs e) =>
RefreshIsEnabledProperty();

/// <include file="../../docs/Microsoft.Maui.Controls/SearchBar.xml" path="//Member[@MemberName='OnSearchButtonPressed']/Docs/*" />
/// <summary>
/// Called when the search button is pressed.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void OnSearchButtonPressed()
{
Expand Down
32 changes: 24 additions & 8 deletions src/Controls/src/Core/SwipeView/SwipeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@

namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="Type[@FullName='Microsoft.Maui.Controls.SwipeView']/Docs/*" />
/// <summary>
/// Represents a view that provides context-specific swipe interactions.
/// </summary>
[ContentProperty(nameof(Content))]
public partial class SwipeView : ContentView, IElementConfiguration<SwipeView>, ISwipeViewController, ISwipeView, IVisualTreeElement
{
readonly Lazy<PlatformConfigurationRegistry<SwipeView>> _platformConfigurationRegistry;

readonly List<ISwipeItem> _swipeItems = new List<ISwipeItem>();

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
/// <summary>
/// Initializes a new instance of the <see cref="SwipeView"/> class.
/// </summary>
public SwipeView()
{
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<SwipeView>>(() => new PlatformConfigurationRegistry<SwipeView>(this));
Expand Down Expand Up @@ -55,35 +59,45 @@ public SwipeView()
BindableProperty.Create(nameof(BottomItems), typeof(SwipeItems), typeof(SwipeView), null, BindingMode.OneWay, null, defaultValueCreator: SwipeItemsDefaultValueCreator,
propertyChanged: OnSwipeItemsChanged);

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='Threshold']/Docs/*" />
/// <summary>
/// Gets or sets the swipe threshold distance.
/// </summary>
public double Threshold
{
get { return (double)GetValue(ThresholdProperty); }
set { SetValue(ThresholdProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='LeftItems']/Docs/*" />
/// <summary>
/// Gets or sets the collection of swipe items on the left side.
/// </summary>
public SwipeItems LeftItems
{
get { return (SwipeItems)GetValue(LeftItemsProperty); }
set { SetValue(LeftItemsProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='RightItems']/Docs/*" />
/// <summary>
/// Gets or sets the collection of swipe items on the right side.
/// </summary>
public SwipeItems RightItems
{
get { return (SwipeItems)GetValue(RightItemsProperty); }
set { SetValue(RightItemsProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='TopItems']/Docs/*" />
/// <summary>
/// Gets or sets the collection of swipe items on the top side.
/// </summary>
public SwipeItems TopItems
{
get { return (SwipeItems)GetValue(TopItemsProperty); }
set { SetValue(TopItemsProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='BottomItems']/Docs/*" />
/// <summary>
/// Gets or sets the collection of swipe items on the bottom side.
/// </summary>
public SwipeItems BottomItems
{
get { return (SwipeItems)GetValue(BottomItemsProperty); }
Expand Down Expand Up @@ -196,7 +210,9 @@ public void Open(OpenSwipeItem openSwipeItem, bool animated = true)
((ISwipeView)this).RequestOpen(new SwipeViewOpenRequest(openSwipeItem, animated));
}

/// <include file="../../docs/Microsoft.Maui.Controls/SwipeView.xml" path="//Member[@MemberName='Close']/Docs/*" />
/// <summary>
/// Closes the swipe view.
/// </summary>
public void Close(bool animated = true)
{
CloseRequested?.Invoke(this, new CloseRequestedEventArgs(animated));
Expand Down
32 changes: 24 additions & 8 deletions src/Controls/src/Core/TableView/TableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="Type[@FullName='Microsoft.Maui.Controls.TableView']/Docs/*" />
/// <summary>
/// Represents a table view control for displaying tabular data.
/// </summary>
[Obsolete("Please use CollectionView instead.")]
[ContentProperty(nameof(Root))]
public class TableView : View, ITableViewController, IElementConfiguration<TableView>, IVisualTreeElement
Expand All @@ -30,12 +32,16 @@ public class TableView : View, ITableViewController, IElementConfiguration<Table

TableModel _model;

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='.ctor'][1]/Docs/*" />
/// <summary>
/// Initializes a new instance of the <see cref="TableView"/> class.
/// </summary>
public TableView() : this(null)
{
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='.ctor'][2]/Docs/*" />
/// <summary>
/// Initializes a new instance of the <see cref="TableView"/> class with the specified root.
/// </summary>
public TableView(TableRoot root)
{
#pragma warning disable CS0618 // Type or member is obsolete
Expand All @@ -45,14 +51,18 @@ public TableView(TableRoot root)
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<TableView>>(() => new PlatformConfigurationRegistry<TableView>(this));
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='HasUnevenRows']/Docs/*" />
/// <summary>
/// Gets or sets a value indicating whether the table has rows with uneven heights.
/// </summary>
public bool HasUnevenRows
{
get { return (bool)GetValue(HasUnevenRowsProperty); }
set { SetValue(HasUnevenRowsProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='Intent']/Docs/*" />
/// <summary>
/// Gets or sets the intent of the table view.
/// </summary>
public TableIntent Intent
{
get { return _intent; }
Expand All @@ -67,7 +77,9 @@ public TableIntent Intent
}
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='Root']/Docs/*" />
/// <summary>
/// Gets or sets the root of the table view.
/// </summary>
public TableRoot Root
{
get { return _tableModel.Root; }
Expand All @@ -90,14 +102,18 @@ public TableRoot Root
}
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='RowHeight']/Docs/*" />
/// <summary>
/// Gets or sets the height of each row.
/// </summary>
public int RowHeight
{
get { return (int)GetValue(RowHeightProperty); }
set { SetValue(RowHeightProperty, value); }
}

/// <include file="../../docs/Microsoft.Maui.Controls/TableView.xml" path="//Member[@MemberName='Model']/Docs/*" />
/// <summary>
/// Gets or sets the table model.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public TableModel Model
{
Expand Down
Loading