SimpleToolkit.SimpleButton
1.0.0
dotnet add package SimpleToolkit.SimpleButton --version 1.0.0
NuGet\Install-Package SimpleToolkit.SimpleButton -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimpleToolkit.SimpleButton" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleToolkit.SimpleButton" Version="1.0.0" />
<PackageReference Include="SimpleToolkit.SimpleButton" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SimpleToolkit.SimpleButton --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SimpleToolkit.SimpleButton, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SimpleToolkit.SimpleButton@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SimpleToolkit.SimpleButton&version=1.0.0
#tool nuget:?package=SimpleToolkit.SimpleButton&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SimpleToolkit.SimpleButton
SimpleButton is a flexible .NET MAUI control that inherits from Border, allowing you to wrap any content and turn it into a fully functional button.
๐ Getting Started
- Initialize: Call the
UseSimpleButton()extension method in yourMauiProgram.csfile:
builder.UseSimpleButton();
- Namespace: Add the following XAML namespace to your page:
xmlns:sb="clr-namespace:SimpleToolkit.SimpleButton;assembly=SimpleToolkit.SimpleButton"
๐ Usage Example
Let's define a SimpleButton with an Image and Label:
<sb:SimpleButton
Clicked="StarButtonClicked"
Background="Orange"
HorizontalOptions="Center"
StrokeShape="{RoundRectangle CornerRadius=6}">
<HorizontalStackLayout Padding="12,10" Spacing="10">
<Image
Source="star.png" TintColor="White"
VerticalOptions="Center"
HeightRequest="18" WidthRequest="18"/>
<Label
Text="Star this repo" TextColor="White"
FontAttributes="Bold"
VerticalOptions="Center"/>
</HorizontalStackLayout>
</sb:SimpleButton>
๐จ Visual States
SimpleButton supports standard .NET MAUI visual states to provide touch feedback:
<sb:SimpleButton
Clicked="StarButtonClicked"
Background="Orange"
HorizontalOptions="Center"
StrokeShape="{RoundRectangle CornerRadius=6}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroupList>
<VisualStateGroup>
<VisualState x:Name="Normal"/>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter
Property="Background"
Value="OrangeRed"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter
Property="Background"
Value="DarkOrange"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</VisualStateManager.VisualStateGroups>
<HorizontalStackLayout Padding="12,10" Spacing="10">
<Image
Source="star.png" TintColor="White"
VerticalOptions="Center"
HeightRequest="18" WidthRequest="18"/>
<Label
Text="Star this repo" TextColor="White"
FontAttributes="Bold"
VerticalOptions="Center"/>
</HorizontalStackLayout>
</sb:SimpleButton>
๐ API Reference
Since SimpleButton inherits from Border, it includes all standard Border properties plus:
| Member | Description |
|---|---|
Clicked |
Event fired when the button is tapped/clicked. |
Pressed |
Event fired when the button is pressed. |
Released |
Event fired when the touch is released. |
Command |
ICommand invoked on click. |
CommandParameter |
Object passed to the Command. |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-ios26.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 92 | 2/20/2026 |