Skip to content

Commit f32d4eb

Browse files
authored
Update README.md
1 parent 31d3332 commit f32d4eb

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
| :memo: | This is a MAUI version of my [Xamarin NuGet](https://github.com/IeuanWalker/Xamarin.Forms.StateButton) |
22
|---------------|:------------------------|
33

4-
| :warning: | I havnt tested iOS <i>yet, (all should be fine though)</i> |
5-
|---------------|:------------------------|
6-
74
# Maui.StateButton [![Nuget](https://img.shields.io/nuget/v/IeuanWalker.Maui.StateButton)](https://www.nuget.org/packages/IeuanWalker.Maui.StateButton) [![Nuget](https://img.shields.io/nuget/dt/IeuanWalker.Maui.StateButton)](https://www.nuget.org/packages/IeuanWalker.Maui.StateButton)
85

96
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
@@ -15,25 +12,24 @@ This is possible as it acts as a wrapper to your XAML and provides you the event
1512

1613
It's also **100% accessible** with each platform seeing/ treating the control as a native button.
1714

18-
The [example page](https://github.com/IeuanWalker/Maui.StateButton/blob/master/Demo/ExamplePage.xaml), has a bunch of different design to showcase the usage -
15+
Check out the [examples](https://github.com/IeuanWalker/Maui.StateButton/tree/master/Demo/Controls/Examplesl), for a bunch of different designs -
1916

2017
![Example gif](/Example.gif)
2118

2219
## How to use it?
2320
Install the [NuGet package](https://www.nuget.org/packages/IeuanWalker.Maui.StateButton/) into your shared project project
2421
```
25-
Install-Package IeuanWalker.StateButton
22+
Install-Package IeuanWalker.Maui.StateButton
2623
```
2724

2825
Then in the MauiProgram.cs, and the StateButton configuration method -
2926
```csharp
30-
using StateButton;
27+
using IeuanWalker.Maui.StateButton;
3128
```
3229
```csharp
3330
builder
3431
.UseMauiApp<App>()
35-
.UseMauiCommunityToolkit()
36-
.ConfigureStateButton();
32+
.UseStateButton();
3733
```
3834

3935
## What can I do with it?
@@ -81,7 +77,7 @@ Simply add a Trigger to any element and bind it to the `State` property of the b
8177
</Label>
8278
</stateButton:StateButton>
8379
```
84-
More exmaples can be found in the demo app - https://github.com/IeuanWalker/Maui.StateButton/blob/master/Demo/ExamplePage.xaml
80+
More examples can be found in the demo app - https://github.com/IeuanWalker/Maui.StateButton/tree/master/Demo/Controls/Examples
8581

8682
## Accessibility
8783
The control itself is seen as a native button on both platforms, so inherits the same accessbility attributes. So from a screenreader and keyboard POV it is a native button.
@@ -92,5 +88,11 @@ There are a few things you can do to improve the accessibility -
9288

9389
2. Optionally you can also set the [`SemanticProperties.Hint`](https://docs.microsoft.com/en-us/dotnet/maui/fundamentals/accessibility#hint) property. Using this property you can give more context to what the button is for/ will do.
9490

91+
For example, setting the `SemanticProperties.Description` to 'Reload', and `SemanticProperties.Hint` to 'Reload list of contacts'. The user using a screen reader will here something like - 'Reload button, Reload list of contacts, double tap to activate'
92+
93+
## Recomended usage
94+
I recommend creating a [`ControlTemplate`](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/controltemplate?view=net-maui-7.0) so you can easily re-use the control. You can see how i do this in the `Example6` example button ([xaml](https://github.com/IeuanWalker/Maui.StateButton/blob/master/Demo/Controls/Examples/Example6.xaml)/ [c#](https://github.com/IeuanWalker/Maui.StateButton/blob/master/Demo/Controls/Examples/Example6.xaml.cs))
95+
96+
9597
## License
9698
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FIeuanWalker%2FMaui.StateButton.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FIeuanWalker%2FMaui.StateButton?ref=badge_large)

0 commit comments

Comments
 (0)