Skip to content

959295 - Review changes the Third six Xamarin Tools Controls by AI #1111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
89 changes: 44 additions & 45 deletions Xamarin/Button/Customization.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Xamarin/Button/Event.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
layout: post
title: Event in Xamarin Button control | Syncfusion
description: Learn here all about Event support in Syncfusion Xamarin Button (SfButton) control, its elements and more.
platform: xamarin
title: Event in Xamarin Button Control | Syncfusion
description: Discover event support in the Syncfusion Xamarin Button (SfButton) control and learn how to handle click events.
platform: Xamarin
control: SfButton
documentation: ug

---

# Event in Xamarin Button (SfButton)

## Clicked event
## Clicked Event

The click event occurs when the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) is clicked. The event argument is of type `EventArgs`.

Expand Down
78 changes: 39 additions & 39 deletions Xamarin/Button/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
---
layout: post
title: Getting Started with Xamarin Button control | Syncfusion
description: Learn here about getting started with Syncfusion Xamarin Button (SfButton) control, its elements and more.
platform: xamarin
control: sfbutton
title: Getting Started with Xamarin Button Control | Syncfusion
description: Discover how to get started with the Syncfusion Xamarin Button (SfButton) control, including key elements and configuration steps.
platform: Xamarin
control: SfButton
documentation: ug
---

# Getting Started with Xamarin Button (SfButton)

This section explains the steps required to work with the [Xamarin.Forms Button](https://www.syncfusion.com/xamarin-ui-controls/xamarin-button) control.

## Assembly deployment
## Assembly Deployment

After installing [Essential Studio® for Xamarin](https://www.syncfusion.com/downloads/xamarin), you can find all the required assemblies in the installation folders, {Syncfusion Essential Studio Installed location} \Essential Studio\\{Version #}\Xamarin\lib.
After installing [Essential Studio® for Xamarin](https://www.syncfusion.com/downloads/xamarin), you can find all the required assemblies in the installation folders at {Syncfusion Essential Studio Installed location}\Essential Studio\\{Version #}\Xamarin\lib.

E.g.: C:\Program Files (x86) \Syncfusion\Essential Studio\19.1.0.54\Xamarin\lib

N> Assemblies can be found in unzipped package location(Documents/Syncfusion/{Version #}/Xamarin/lib) in Mac.
> Note: Assemblies can be found in the unzipped package location (Documents/Syncfusion/{Version #}/Xamarin/lib) on a Mac.

## Adding SfButton reference
## Adding SfButton Reference

You can add SfButton reference using one of the following methods:
You can add the SfButton reference using one of the following methods:

**Method 1: Adding SfButton reference from nuget.org**
### Method 1: Adding SfButton Reference from nuget.org

Syncfusion Xamarin components are available in [nuget.org](https://www.nuget.org/). To add SfButton to your project, open the [NuGet package](https://help.syncfusion.com/xamarin/visual-studio-integration/nuget-packages) manager in Visual Studio, search for [Syncfusion.Xamarin.Buttons](https://www.nuget.org/packages/Syncfusion.Xamarin.Buttons), and then install it.
Syncfusion Xamarin components are available on [nuget.org](https://www.nuget.org/). To add SfButton to your project, open the [NuGet Package Manager](https://help.syncfusion.com/xamarin/visual-studio-integration/nuget-packages) in Visual Studio, search for [Syncfusion.Xamarin.Buttons](https://www.nuget.org/packages/Syncfusion.Xamarin.Buttons), and install it.

![Adding SfButton reference from NuGet](Images/Adding SfButton reference.png)

N>
* Install the same version of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) NuGet in all the projects.
* In addition, you need to install the [Syncfusion.Xamarin.Buttons.WPF]() package for Xamarin.Forms WPF platform only.
> Note:
> - Install the same version of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) NuGet in all projects.
> - Additionally, install the [Syncfusion.Xamarin.Buttons.WPF]() package for Xamarin.Forms WPF platform only.

**Method 2: Adding SfButton reference from toolbox**
### Method 2: Adding SfButton Reference from Toolbox

Syncfusion also provides Xamarin Toolbox. Using this toolbox, you can drag the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control to the XAML page. It will automatically install the required NuGet packages and add the namespace to the page. To install Syncfusion Xamarin Toolbox, refer to [Toolbox](https://help.syncfusion.com/xamarin/utility#toolbox).
Syncfusion also provides a Xamarin Toolbox. Using this toolbox, you can drag the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control to the XAML page. It will automatically install the required NuGet packages and add the namespace to the page. To install Syncfusion Xamarin Toolbox, refer to the [Toolbox](https://help.syncfusion.com/xamarin/utility#toolbox) documentation.

**Method 3: Adding SfButton assemblies manually from the installed location**
### Method 3: Adding SfButton Assemblies Manually from the Installed Location

If you prefer to manually reference the assemblies instead referencing from NuGet, add the following assemblies in respective projects.
If you prefer to manually reference the assemblies instead of using NuGet, add the following assemblies to the respective projects.

Location: {Installed location}/{version}/Xamarin/lib

Expand All @@ -66,15 +66,15 @@ tr>
</tr>
</table>

N> To know more about obtaining our components, refer to these links for [Mac](https://help.syncfusion.com/xamarin/installation/mac-installer/how-to-download) and [Windows](https://help.syncfusion.com/xamarin/installation/web-installer/how-to-download).
> Note: For more information on obtaining our components, refer to these links for [Mac](https://help.syncfusion.com/xamarin/installation/mac-installer/how-to-download) and [Windows](https://help.syncfusion.com/xamarin/installation/web-installer/how-to-download).

I> Starting with v16.2.0.x, if you reference Syncfusion assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [Syncfusion license key](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion license key in your Xamarin application to use our components.
> Info: Starting with v16.2.0.x, if you reference Syncfusion assemblies from the trial setup or the NuGet feed, you must include a license key in your projects. Refer to [Syncfusion license key](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn about registering a Syncfusion license key in your Xamarin application to use our components.

N> After adding the reference, an additional step is required for iOS and UWP projects. If you are adding the references from toolbox, this step is not needed.
> Note: After adding the reference, an additional step is required for iOS and UWP projects. If you are adding the references from the toolbox, this step is not needed.

### Additional step for iOS
### Additional Step for iOS

To launch [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) in iOS, call `SfButtonRenderer.Init()` in the `FinishedLaunching` overridden method of the `AppDelegate` class in iOS Project as demonstrated in the following code example.
To launch [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) in iOS, call `SfButtonRenderer.Init()` in the `FinishedLaunching` overridden method of the `AppDelegate` class in the iOS project, as demonstrated in the following code example.

{% tabs %}
{% highlight c# %}
Expand All @@ -89,9 +89,9 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{% endhighlight %}
{% endtabs %}

### Additional step for UWP
### Additional Step for UWP

This step is required only if the application is deployed in Release mode with .NET native tool chain enabled. It is needed for resolving the known Framework issue “Custom controls not rendering in Release mode” in UWP platform. Initializing the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) assembly at the `OnLaunched` overridden method of the `App` class in UWP project is the suggested work around. The following code example demonstrates initializing the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) assembly.
This step is required only if the application is deployed in Release mode with the .NET native tool chain enabled. It is needed to resolve the known framework issue “Custom controls not rendering in Release mode” on the UWP platform. Initializing the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) assembly in the `OnLaunched` overridden method of the `App` class in the UWP project is the suggested workaround. The following code example demonstrates initializing the [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) assembly.

{% tabs %}
{% highlight c# %}
Expand All @@ -111,9 +111,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
{% endhighlight %}
{% endtabs %}

### Additional step for WPF
### Additional Step for WPF

To launch the button in WPF, call the SfButtonRenderer.Init() method in the MainWindow constructor of the MainWindow class after the Xamarin.Forms framework has been initialized and before the LoadApplication method is called as demonstrated in the following code sample.
To launch the button in WPF, call the `SfButtonRenderer.Init()` method in the MainWindow constructor of the MainWindow class after the Xamarin.Forms framework has been initialized and before the `LoadApplication` method is called, as demonstrated in the following code sample.

{% tabs %}
{% highlight c# %}
Expand All @@ -137,11 +137,11 @@ public partial class MainWindow : FormsApplicationPage
{% endhighlight %}
{% endtabs %}

## Creating a simple SfButton
## Creating a Simple SfButton

The [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control is configured entirely in C# code or in XAML markup. The following steps explain how to create a [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) and configure its elements.
The [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control is configured entirely in C# code or XAML markup. The following steps explain how to create an [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) and configure its elements.

### Adding namespace for referred assemblies
### Adding Namespace for Referred Assemblies

{% tabs %}
{% highlight xaml %}
Expand All @@ -152,7 +152,7 @@ using Syncfusion.XForms.Buttons;
{% endhighlight %}
{% endtabs %}

### Referring SfButton control with declared suffix name for namespace
### Referring SfButton Control with Declared Suffix Name for Namespace

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -194,9 +194,9 @@ namespace SfButton
{% endhighlight %}
{% endtabs %}

## Setting caption
## Setting Caption

The button caption can be defined using the [`Text`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_Text) property of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html). This caption normally describes the meaning of the button and is displayed in button.
The button caption can be defined using the [`Text`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_Text) property of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html). This caption normally describes the button's function and is displayed on the button.

{% tabs %}
{% highlight xaml %}
Expand All @@ -214,9 +214,9 @@ button.Text = "Button";

![SfButton with caption](images/ButtonWithText.png)

## Toggle button
## Toggle Button

The button behavior can be changed as toggle button by defining the [`IsCheckable`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_IsCheckable) property of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).
The button behavior can be changed to a toggle button by defining the [`IsCheckable`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_IsCheckable) property of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).

{% tabs %}
{% highlight xaml %}
Expand All @@ -239,9 +239,9 @@ Checked state:

Unchecked state:

![SfButton with toggle relased state](images/Toggle_Released_Button.png)
![SfButton with toggle released state](images/Toggle_Released_Button.png)

## Button icon
## Button Icon

The button icon can be defined using the [`ImageSource`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_ImageSource) and [`ShowIcon`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_ShowIcon) properties of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).

Expand All @@ -263,7 +263,7 @@ button.ShowIcon = true;

![SfButton with button icon](images/ButtonWithIcon.png)

## Button background image
## Button Background Image

The button background icon can be defined using the [`BackgroundImage`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_BackgroundImage) property of [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).

Expand All @@ -286,7 +286,7 @@ button.CornerRadius = new Thickness(20);

![Button with background image](images/ButtonWithBackgroundImage.png)

## See also
## See Also

[How to create Xamarin.Forms image button](https://support.syncfusion.com/kb/article/9599/how-to-create-image-button-in-xamarinforms-button)

Expand Down
24 changes: 12 additions & 12 deletions Xamarin/Button/Overview.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
layout: post
title: About Xamarin Button control | Syncfusion
description: Learn here all about introduction of Syncfusion Xamarin Button (SfButton) control, its elements and more.
platform: xamarin
control: sfbutton
title: About Xamarin Button Control | Syncfusion
description: Introduction to Syncfusion Xamarin Button (SfButton) control, its features, and capabilities.
platform: Xamarin
control: SfButton
documentation: ug
---

# Xamarin Button (SfButton) Overview

The Xamarin.Forms Button is a custom button control with UI customization, toggle states, and theme support. You can set icons, background images, and corner edge radii and customize the appearance for different visual states using the visual state manager.
The Xamarin.Forms Button is a versatile custom control that offers UI customization, toggle states, and theme support. It allows you to set icons, background images, corner edge radii, and customize the appearance for different visual states using the visual state manager.

## Key features
## Key Features

* Easily customize a button as an outline, flat, circle, or icon button.
* Use visual states such as pressed, normal, checked, and unchecked.
* Display an image as the background for the control.
* Display custom content in the button control.
* Use a toggle button.
- Easily customize a button to be an outline, flat, circle, or icon button.
- Use visual states such as pressed, normal, checked, and unchecked.
- Display an image as the control's background.
- Display custom content in the button control.
- Implement as a toggle button.

![Overview image of SfButton](Images/overview.png)
![Overview Image of SfButton](Images/overview.png)
36 changes: 18 additions & 18 deletions Xamarin/Button/VisualStates.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
layout: post
title: Visual States in Xamarin Button control | Syncfusion
description: Learn here all about Visual States support in Syncfusion Xamarin Button (SfButton) control and more.
platform: xamarin
control: sfbutton
title: Visual States in Xamarin Button Control | Syncfusion
description: Discover how to use Visual States in the Syncfusion Xamarin Button (SfButton) control for enhanced UI customization.
platform: Xamarin
control: SfButton
documentation: ug
---

# Visual States in Xamarin Button (SfButton)

The button visual can be customized through `VisualStates`. The [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control have the following four visual states:
The button's appearance can be customized through `VisualStates`. The [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html) control supports the following five visual states:

* Normal
* Pressed
* Checked
* Unchecked
* Disabled
- Normal
- Pressed
- Checked
- Unchecked
- Disabled

N>
* In addition, `MouseOver` VisualState is available only in the UWP platform.
* The visual states `Checked` and `Unchecked` are only updated when enabling the [`IsChecked`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_IsChecked) property in [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).
> Note:
> - Additionally, the `MouseOver` visual state is available only on the UWP platform.
> - The visual states `Checked` and `Unchecked` are only updated when the [`IsChecked`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_IsChecked) property is enabled in [`SfButton`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html).

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -85,13 +85,13 @@ this.Content = stackLayout;
{% endhighlight %}
{% endtabs %}

**Pressed visual state:**
![SfButton with visual state](images/VisualState_PressedState.png)
**Pressed Visual State:**
![SfButton with pressed visual state](images/VisualState_PressedState.png)

**Normal visual state:**
![SfButton with visual state](images/VisualState_NormalState.png)
**Normal Visual State:**
![SfButton with normal visual state](images/VisualState_NormalState.png)

## See also
## See Also

[How to change Xamarin.Forms button style using its visual states](https://support.syncfusion.com/kb/article/9580/how-to-change-xamarinforms-button-style-using-its-visual-states)

8 changes: 4 additions & 4 deletions Xamarin/Button/how-to/Add-the-custom-view-for-button.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: post
title: How to add the custom view for Syncfusion SfButton
description: How to add the custom view for SfButton.
title: How to Add a Custom View for Syncfusion SfButton
description: Learn how to add a custom view for SfButton in Xamarin.Forms applications using Syncfusion controls.
platform: xamarin.forms
control: sfbutton
documentation: ug
---

# Add the custom view for button
# Add a Custom View for SfButton

You can customize the appearance of the button by adding your custom view in the [`Content`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_Content) property. The following code sample demonstrates how to apply the busy indicator control as custom view for a button.
You can customize the appearance of the SfButton by adding your custom view through the [`Content`](https://help.syncfusion.com/cr/xamarin/Syncfusion.XForms.Buttons.SfButton.html#Syncfusion_XForms_Buttons_SfButton_Content) property. The following code samples demonstrate how to apply the busy indicator control as a custom view within a button.

{% tabs %}
{% highlight xaml %}
Expand Down
Loading