Skip to content

Commit 9d56c6d

Browse files
committed
976335 - Addressed the review comments
1 parent fec7386 commit 9d56c6d

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

MAUI/Toolbar/events.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private void OnMoreButtonTapped(object? sender, ToolbarMoreButtonTappedEventArgs
185185

186186
{% endtabs %}
187187

188-
## SelectionChanged
188+
## Selection Changed
189189

190190
A [SelectionChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html#Syncfusion_Maui_Toolbar_SfToolbar_SelectionChanged) event occurs, each time a toolbar item is selected.
191191

@@ -210,8 +210,8 @@ Below is a list of the arguments:
210210

211211
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="1" %}
212212

213-
this.toolbar.Tapped += this.OnToolbarTapped;
214-
private void OnToolbarTapped(object? sender, ToolbarSelectionChangedEventArgs e)
213+
this.toolbar.SelectionChanged += this.OnToolbarSelectionChanged;
214+
private void OnToolbarSelectionChanged(object? sender, ToolbarSelectionChangedEventArgs e)
215215
{
216216
var newToolbarItems = e.NewToolbarItems;
217217
var oldToolbarItems = e.OldToolbarItems;
@@ -663,14 +663,14 @@ The [SelectionChangedCommand](https://help.syncfusion.com/cr/maui/Syncfusion.Mau
663663

664664
{% tabs %}
665665

666-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="2" %}
666+
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="6" %}
667667

668668
<Grid>
669669
<Grid.BindingContext>
670670
<local:ToolbarInteractionViewModel />
671671
</Grid.BindingContext>
672672
<toolbar:SfToolbar x:Name="toolbar"
673-
TappedCommand="{Binding ToolbarSelectionChangedCommand}"
673+
SelectionChangedCommand="{Binding ToolbarSelectionChangedCommand}"
674674
HeightRequest="56"
675675
Orientation="Horizontal">
676676
<toolbar:SfToolbar.Items>
@@ -695,7 +695,7 @@ The [SelectionChangedCommand](https://help.syncfusion.com/cr/maui/Syncfusion.Mau
695695

696696
{% endhighlight %}
697697

698-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="1" %}
698+
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="7" %}
699699

700700
public partial class MainPage : ContentPage
701701
{
@@ -704,7 +704,7 @@ public partial class MainPage : ContentPage
704704
InitializeComponent();
705705
SfToolbar toolbar = new SfToolbar();
706706
ToolbarInteractionViewModel viewModel = new ToolbarInteractionViewModel();
707-
toolbar.SelectionChanged = viewModel.ToolbarSelectionChangedCommand;
707+
toolbar.SelectionChangedCommand = viewModel.ToolbarSelectionChangedCommand;
708708
ObservableCollection<BaseToolbarItem> itemCollection = new ObservableCollection<BaseToolbarItem>
709709
{
710710
new SfToolbarItem
@@ -748,8 +748,8 @@ public class ToolbarInteractionViewModel
748748
}
749749
private void ExecuteSelectionChanged(ToolbarSelectionChangedEventArgs obj)
750750
{
751-
var oldItem = obj.OldToolbarItems;
752-
var newItem = obj.NewToolbarItems;
751+
var oldItems = obj.OldToolbarItems;
752+
var newItems = obj.NewToolbarItems;
753753
}
754754
}
755755

MAUI/Toolbar/Selection Mode.md renamed to MAUI/Toolbar/selection-mode.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Selection Mode in .NET MAUI Toolbar (SfToolbar)
1111

12-
The Selection mode is specified in the Toolbar property enumeration. You can select the toolbar item by tapping the item in the toolbar. SfToolbar provides three types of modes such as Single, SingleDeselect, and Multiple. The default SelectionMode is Single, which allows the user to select only one item at a time.
12+
The Selection mode is specified in the Toolbar property enumeration. You can select the toolbar item by tapping the item in the toolbar. SfToolbar[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html] provides three types of modes such as `Single`, `SingleDeselect`, and `Multiple`. The default SelectionMode[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html#Syncfusion_Maui_Toolbar_SfToolbar_SelectionMode] is Single[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.ToolbarSelectionMode.html#Syncfusion_Maui_Toolbar_ToolbarSelectionMode_Single], which allows the user to select only one item at a time.
1313

1414
## Single Selection
1515

16-
The Single selection can be performed in the Toolbar by setting the ToolbarSelectionMode property to Single. In this selection, you can select a single item at a time in the toolbar.
16+
The `Single` selection can be performed in the Toolbar by setting the SelectionMode[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html#Syncfusion_Maui_Toolbar_SfToolbar_SelectionMode] property to Single[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.ToolbarSelectionMode.html#Syncfusion_Maui_Toolbar_ToolbarSelectionMode_Single]. In this selection, you can select a single item at a time in the toolbar.
1717

1818
{% tabs %}
1919

@@ -79,7 +79,7 @@ namespace ToolbarSample
7979
InitializeComponent();
8080
SfToolbar toolbar = new SfToolbar();
8181
toolbar.HeightRequest = 56;
82-
toolbar.Selection = ToolbarSelectionMode.Single;
82+
toolbar.SelectionMode = ToolbarSelectionMode.Single;
8383
ObservableCollection<BaseToolbarItem> itemCollection = new ObservableCollection<BaseToolbarItem>
8484
{
8585
new SfToolbarItem
@@ -130,7 +130,7 @@ namespace ToolbarSample
130130

131131
## Single Deselection
132132

133-
The Single Deselection can be performed in the Toolbar by setting the ToolbarSelectionMode property to SingleDeselect. In this selection, you can clear the selection by click the selected item.
133+
The `Single Deselection` can be performed in the Toolbar by setting the SelectionMode[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html#Syncfusion_Maui_Toolbar_SfToolbar_SelectionMode] property to SingleDeselect[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.ToolbarSelectionMode.html#Syncfusion_Maui_Toolbar_ToolbarSelectionMode_SingleDeselect]. In this mode, only one item can be selected at a time, and you can deselect the currently selected item by simply clicking on it again. This provides a quick way to clear the selection without needing additional actions.
134134

135135
{% tabs %}
136136

@@ -196,7 +196,7 @@ namespace ToolbarSample
196196
InitializeComponent();
197197
SfToolbar toolbar = new SfToolbar();
198198
toolbar.HeightRequest = 56;
199-
toolbar.Selection = ToolbarSelectionMode.SingleDeselect;
199+
toolbar.SelectionMode = ToolbarSelectionMode.SingleDeselect;
200200
ObservableCollection<BaseToolbarItem> itemCollection = new ObservableCollection<BaseToolbarItem>
201201
{
202202
new SfToolbarItem
@@ -247,7 +247,9 @@ namespace ToolbarSample
247247

248248
## Multiple Selection
249249

250-
The Multiple selection can be performed in the Toolbar by setting the ToolbarSelectionMode property to Multiple. In this selection, you can select a multiple items in the toolbar. You can remove the selected items by click the selected items.
250+
The `Multiple selection` can be performed in the Toolbar by setting the SelectionMode[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.SfToolbar.html#Syncfusion_Maui_Toolbar_SfToolbar_SelectionMode] property to Multiple[https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Toolbar.ToolbarSelectionMode.html#Syncfusion_Maui_Toolbar_ToolbarSelectionMode_Multiple]. In this mode, users can select more than one item at a time. You can remove selected items by clicking on them again, which will deselect them. This toggle-based interaction provides a clear and efficient method for managing selections without requiring additional controls.
251+
252+
N> Multiple selection not supported when ToolbarItem has Overlay toolbar.
251253

252254
{% tabs %}
253255

@@ -313,7 +315,7 @@ namespace ToolbarSample
313315
InitializeComponent();
314316
SfToolbar toolbar = new SfToolbar();
315317
toolbar.HeightRequest = 56;
316-
toolbar.Selection = ToolbarSelectionMode.Multiple;
318+
toolbar.SelectionMode = ToolbarSelectionMode.Multiple;
317319
ObservableCollection<BaseToolbarItem> itemCollection = new ObservableCollection<BaseToolbarItem>
318320
{
319321
new SfToolbarItem
@@ -362,4 +364,4 @@ namespace ToolbarSample
362364

363365
{% endtabs %}
364366

365-
![selection-modes in .NET Maui toolbar](images/selectionmodes.gif)
367+
![selection-modes in .NET Maui toolbar](images/selectionmodes.gif){:width="350" height="320"}

0 commit comments

Comments
 (0)