Skip to content

Commit 91f43aa

Browse files
Improved SEO for switch control
1 parent 50a0e50 commit 91f43aa

File tree

7 files changed

+45
-38
lines changed

7 files changed

+45
-38
lines changed

MAUI/Switch/Events.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Learn about Event support in the Syncfusion .NET MAUI Switch contro
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch events, maui switch event.
89
---
910

1011
# Events in .NET MAUI Switch
@@ -13,10 +14,10 @@ This section provides information about the events available in the .NET MAUI Sw
1314

1415
## StateChanged event
1516

16-
The StateChanged event occurs when the value or state of [`IsOn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html#Syncfusion_Maui_Buttons_SfSwitch_IsOn) property is changed by tapping the switch button or setting a value to [`IsOn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html#Syncfusion_Maui_Buttons_SfSwitch_IsOn) property. The [`SwitchStateChangedEventArgs`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html) provides the following properties:
17+
The StateChanged event occurs when the value or state of [IsOn](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html#Syncfusion_Maui_Buttons_SfSwitch_IsOn) property is changed by tapping the .NET MAUI Switch button or setting a value to `IsOn` property. The [SwitchStateChangedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html) provides the following properties:
1718

18-
* [`NewValue`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangedEventArgs_NewValue) : Gets the current value of the Switch control.
19-
* [`OldValue`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangedEventArgs_OldValue) : Gets the previous value of the Switch control.
19+
* [NewValue](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangedEventArgs_NewValue) : Gets the current value of the .NET MAUI Switch control.
20+
* [OldValue](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangedEventArgs_OldValue) : Gets the previous value of the .NET MAUI Switch control.
2021

2122
{% tabs %}
2223

@@ -57,10 +58,10 @@ private async void SfSwitch_StateChanged(object sender, SwitchStateChangedEventA
5758

5859
## StateChanging event
5960

60-
The StateChanging event occurs when the state of [`IsOn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html#Syncfusion_Maui_Buttons_SfSwitch_IsOn) property is about to change in the Switch control. The [`SwitchStateChangingEventArgs`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) provides the following properties:
61+
The StateChanging event occurs when the state of [IsOn](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html#Syncfusion_Maui_Buttons_SfSwitch_IsOn) property is about to change in the .NET MAUI Switch control. The [SwitchStateChangingEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) provides the following properties:
6162

62-
* [`NewValue`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangingEventArgs_NewValue) : Gets the current value of the Switch control.
63-
* [`OldValue`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangingEventArgs_OldValue) : Gets the previous value of the Switch control.
63+
* [NewValue](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangingEventArgs_NewValue) : Gets the current value of the .NET MAUI Switch control.
64+
* [OldValue](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html#Syncfusion_Maui_Buttons_SwitchStateChangingEventArgs_OldValue) : Gets the previous value of the .NET MAUI Switch control.
6465
* `Cancel` : Gets or sets a value indicating whether the event should be canceled.
6566

6667
{% tabs %}

MAUI/Switch/Getting-Started.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Learn here about getting started with the Syncfusion .NET MAUI Swit
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch contrl, maui switch control.
89
---
910

1011
# Getting Started with .NET MAUI Switch (SfSwitch)
@@ -13,7 +14,7 @@ This section explains the steps to configure the .NET MAUI Switch control in a r
1314

1415
## Adding a .NET MAUI Switch reference
1516

16-
The Syncfusion .NET MAUI controls are available in [Nuget.org](https://www.nuget.org/). To add [`.NET MAUI Switch`](https://www.syncfusion.com/maui-controls/maui-switch) to your project, open the NuGet package manager in Visual Studio, search for [`Syncfusion.Maui.Buttons`](https://www.nuget.org/packages/Syncfusion.Maui.Buttons), and install it.
17+
The Syncfusion .NET MAUI controls are available in [Nuget.org](https://www.nuget.org/). To add [.NET MAUI Switch](https://www.syncfusion.com/maui-controls/maui-switch) to your project, open the NuGet package manager in Visual Studio, search for [Syncfusion.Maui.Buttons](https://www.nuget.org/packages/Syncfusion.Maui.Buttons), and install it.
1718

1819
## Handler registration
1920

@@ -53,7 +54,7 @@ namespace SwitchSample
5354

5455
Step 1: Add the NuGet to the project as discussed in the above reference section.
5556

56-
Step 2: Add the namespace as shown in the following code sample.
57+
Step 2: Add the namespace as shown in the following code sample, to initialize the .NET MAUI Switch control.
5758

5859
{% tabs %}
5960
{% highlight xaml %}
@@ -70,7 +71,7 @@ Step 2: Add the namespace as shown in the following code sample.
7071

7172
## Initialize Switch
7273

73-
Now, add the [`SfSwitch`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html) control with a required optimal name using the included namespace.
74+
Now, add the [SfSwitch](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSwitch.html) control with a required optimal name using the included namespace.
7475

7576
{% tabs %}
7677

@@ -93,9 +94,9 @@ this.Content = sfSwitch;
9394

9495
## Performing an action based on state
9596

96-
You can switch between the states. When the state is changed the [`StateChanging`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) and [`StateChanged`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html) event will be triggered where you can perform an action based on the current state. The [`StateChanging`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) event allows you to cancel moving to a new state.
97+
You can switch between states in the .NET MAUI Switch control. When the state changes, the [StateChanging](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) and [StateChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs.html) events are triggered, allowing you to perform actions based on the current state. The [StateChanging](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchStateChangingEventArgs.html) event also provides the option to cancel the transition to a new state.
9798

98-
The following code example displays a message box when switched to off state when work is completed.
99+
The following code example displays a message box when the .NET MAUI Switch is switched to the off state after the work is completed.
99100

100101
{% tabs %}
101102

MAUI/Switch/Overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ description: Learn here about introduction of the Syncfusion .NET MAUI Switch (S
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch contrl, maui switch control.
89
---
910

1011
# .NET MAUI Switch (SfSwitch) Overview
1112

12-
The Switch control in .NET MAUI provides an efficient way to select between the states based on the toggled value.
13+
The .NET MAUI Switch control provides an efficient way to select between the states based on the toggled value.
1314

1415
## Key features
1516

MAUI/Switch/Right-To-Left.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ description: Learn here all about Right To Left support in Syncfusion .NET MAUI
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch rtl, maui switch flow direction.
89
---
910

1011
# Right To Left in .NET MAUI Switch (SfSwitch)
1112

12-
SfSwitch supports changing the layout direction of the control in the right-to-left direction by setting the FlowDirection to RightToLeft or by changing the device language.
13+
The .NET MAUI Switch supports changing the layout direction of the control in the right-to-left direction by setting the `FlowDirection` to RightToLeft or by changing the device language.
1314

1415
{% tabs %}
1516

MAUI/Switch/Visual-State-Manager.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Learn here all about handling of visual state manager in Syncfusion
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch visual states, maui switch visuals.
89
---
910

1011
# Visual State Manager in .NET MAUI Switch (SfSwitch)

MAUI/Switch/customization.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ description: Learn here all about Customization support in Syncfusion .NET MAUI
55
platform: maui
66
control: SfSwitch
77
documentation: ug
8+
keywords : .net maui switch, maui switch, .net maui switch ccustomize, maui switch customize, maui switch color, maui switch size, maui switch icon.
89
---
910

1011
# Customization in .NET MAUI Switch (SfSwitch)
1112

12-
The switch control provides options to customize the color based on the states. The following code example demonstrates how to customize the switch control.
13+
The .NET MAUI Switch control provides options to customize the color based on its states. The following code example demonstrates how to customize the .NET MAUI Switch control.
1314

1415
## Colors
1516

1617
The following properties are used to apply solid colors to the thumb, track, and border, respectively:
1718

18-
* [`TrackBackground`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackBackground): Represents the color for the track.
19-
* [`ThumbBackground`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbBackground): Represents the color for the thumb.
20-
* [`TrackStroke`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackStroke): Represents the color for the border of the track.
21-
* [`ThumbStroke`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbStroke): Represents the border color for the thumb.
19+
* [TrackBackground](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackBackground): Represents the color for the track.
20+
* [ThumbBackground](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbBackground): Represents the color for the thumb.
21+
* [TrackStroke](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackStroke): Represents the color for the border of the track.
22+
* [ThumbStroke](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbStroke): Represents the border color for the thumb.
2223

2324
{% tabs %}
2425

@@ -121,18 +122,18 @@ this.Content = sfSwitch;
121122

122123
## Sizing
123124

124-
In the switch control, sizing of the thumb and the track can be controlled by using the following properties:
125+
In the .NET MAUI Switch control, sizing of the thumb and the track can be controlled by using the following properties:
125126

126-
* [`TrackCornerRadius`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackCornerRadius): Represents a CornerRadius value to create curved corner of the track.
127-
* [`TrackStrokeThickness`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackStrokeThickness): Represents a double value for defining the track border width.
128-
* [`TrackWidthRequest`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackWidthRequest): Represents a double value for defining the track width.
129-
* [`TrackHeightRequest`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackHeightRequest): Represents double value for defining the track height.
130-
* [`ThumbCornerRadius`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbCornerRadius): Represents a CornerRadius value to create curved corner of the thumb.
131-
* [`ThumbStrokeThickness`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbStrokeThickness): Represents a double value for defining the thumb border width.
132-
* [`ThumbWidthRequest`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbWidthRequest): Represents double value for defining the thumb width.
133-
* [`ThumbHeightRequest`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbHeightRequest): Represents double value for defining the thumb height.
127+
* [TrackCornerRadius](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackCornerRadius): Represents a CornerRadius value to create curved corner of the track.
128+
* [TrackStrokeThickness](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackStrokeThickness): Represents a double value for defining the track border width.
129+
* [TrackWidthRequest](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackWidthRequest): Represents a double value for defining the track width.
130+
* [TrackHeightRequest](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_TrackHeightRequest): Represents double value for defining the track height.
131+
* [ThumbCornerRadius](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbCornerRadius): Represents a CornerRadius value to create curved corner of the thumb.
132+
* [ThumbStrokeThickness](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbStrokeThickness): Represents a double value for defining the thumb border width.
133+
* [ThumbWidthRequest](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbWidthRequest): Represents double value for defining the thumb width.
134+
* [ThumbHeightRequest](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_ThumbHeightRequest): Represents double value for defining the thumb height.
134135

135-
The following code example demonstrates how to customize the size of the track and thumb.
136+
The following code example demonstrates how to customize the size of the track and thumb in a .NET MAUI Switch.
136137

137138
{% tabs %}
138139

@@ -228,10 +229,10 @@ this.Content = sfSwitch;
228229

229230
## Custom Path
230231

231-
In the switch control, customize the thumb's icon by using the following properties:
232+
In the .NET MAUI Switch control, customize the thumb's icon by using the following properties:
232233

233-
* [`CustomPath`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_CustomPath): Represents a Path value for defining the thumb's icon.
234-
* [`IconColor`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_IconColor): Represents the color for the thumb's icon.
234+
* [CustomPath](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_CustomPath): Represents a Path value for defining the thumb's icon.
235+
* [IconColor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SwitchSettings.html#Syncfusion_Maui_Buttons_SwitchSettings_IconColor): Represents the color for the thumb's icon.
235236

236237
{% tabs %}
237238

0 commit comments

Comments
 (0)