Strypper / mauisland

MAUIsland 🏝️ is the number 1 controls gallery for .NET MAUI
MIT License
195 stars 14 forks source link

🚀 Maui.Switch #138

Open Strypper opened 1 year ago

Strypper commented 1 year ago

Preview

Original Link

License: MIT Build FOSSA Status Codacy Badge

This is a switch/ toggle control that would allow you to create any style switch you'd like.
This component is built on top/of this great library - https://github.com/Phenek/Global.InputForms. Fixes a few issues, adds more options for styling, and improved accessibility.

Take a look at the demo app included in this project -

Public API Changes

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="App.MainPage"
             xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:controls="clr-namespace:App.Controls;assembly=App"
             Padding="{StaticResource PagePadding}">
    <ContentPage.Content>
        <VerticalStackLayout Spacing="20" VerticalOptions="Center">
            <controls:CustomButton Clicked="CustomSwitchBtn_Clicked" Text="CustomSwitch examples" />
            <controls:CustomButton Clicked="SwitchViewBtn_Clicked" Text="SwitchView examples" />
            <controls:CustomButton Clicked="AccessibilityBtn_Clicked" Text="Accessiblity tests" />
            <controls:CustomButton Clicked="PanGestureBtn_Clicked" Text="PanGesture tests" />
        </VerticalStackLayout>
    </ContentPage.Content>
</ContentPage>

Intended Use-Case

Replace the boring built-in MAUI toggle switch for better UI and customizations.

Strypper commented 1 year ago
git fetch origin
git checkout 138-feature-add-mauiswitch