Skip to content
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
3 changes: 3 additions & 0 deletions OneGateApp/Controls/Views/SpinnerButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:og="http://schemas.neoorder.org/onegate/controls"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="NeoOrder.OneGate.Controls.Views.SpinnerButton">
<ContentView.Resources>
<toolkit:InvertedBoolConverter x:Key="InvertedBoolConverter" />
<og:SpinnerButtonTextConverter x:Key="SpinnerButtonTextConverter" />
</ContentView.Resources>
<Grid BindingContext="{Binding Source={RelativeSource AncestorType={x:Type og:SpinnerButton}}}">
Expand All @@ -14,6 +16,7 @@
BackgroundColor="{Binding ButtonColor}"
BorderWidth="{Binding BorderWidth}"
BorderColor="{Binding BorderColor}"
IsEnabled="{Binding IsBusy, Converter={StaticResource InvertedBoolConverter}}"
SemanticProperties.Description="{Binding Text}"
Clicked="Button_Clicked">
<VisualStateManager.VisualStateGroups>
Expand Down
1 change: 1 addition & 0 deletions OneGateApp/Controls/Views/SpinnerButton.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public IDisposable EnterBusyState()

private void Button_Clicked(object sender, EventArgs e)
{
if (IsBusy) return;
Clicked?.Invoke(this, EventArgs.Empty);
}
}