Skip to content

Commit 8befeea

Browse files
committed
Added effects for Windows buttons
1 parent 09dd9cc commit 8befeea

15 files changed

+811
-147
lines changed

src/Bible.Alarm/Views/BiblePublications/BiblePublicationSelectionModal.xaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
xmlns:behaviours="clr-namespace:Bible.Alarm.Common.ViewHelpers.Behaviours"
1212
xmlns:shared="clr-namespace:Bible.Alarm.ViewModels.Shared"
1313
xmlns:sharedViews="clr-namespace:Bible.Alarm.Views.Shared"
14+
xmlns:sharedControls="clr-namespace:Bible.Alarm.Views.Shared;assembly=Bible.Alarm"
1415
xmlns:system="clr-namespace:System;assembly=System.Runtime"
16+
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
1517
x:DataType="bible:BiblePublicationSelectionViewModel"
1618
Padding="0,0,0,0">
1719
<ContentPage.Resources>
@@ -152,8 +154,41 @@
152154
Opacity="0.1"
153155
Radius="4" />
154156
</Border.Shadow>
155-
<Button
156-
x:Name="CloseButton"
157+
<!-- Close button - SfEffectsView for WinUI only -->
158+
<core:SfEffectsView x:Name="CloseButtonEffectsView"
159+
TouchDownEffects="Ripple"
160+
TouchUpEffects="None"
161+
RippleBackground="{DynamicResource PrimaryColor}"
162+
RippleAnimationDuration="200"
163+
ShouldIgnoreTouches="False"
164+
HorizontalOptions="Fill"
165+
VerticalOptions="Fill">
166+
<core:SfEffectsView.IsVisible>
167+
<OnPlatform x:TypeArguments="x:Boolean" Default="false">
168+
<On Platform="WinUI" Value="true" />
169+
</OnPlatform>
170+
</core:SfEffectsView.IsVisible>
171+
<core:SfEffectsView.GestureRecognizers>
172+
<TapGestureRecognizer Command="{Binding CloseModalCommand}" />
173+
</core:SfEffectsView.GestureRecognizers>
174+
<Button x:Name="CloseButton"
175+
BackgroundColor="Transparent"
176+
BorderWidth="0"
177+
BorderColor="Transparent"
178+
Command="{Binding CloseModalCommand}"
179+
CornerRadius="12"
180+
FontSize="{DynamicResource ButtonFontSize}"
181+
FontAttributes="Bold"
182+
HorizontalOptions="Fill"
183+
MinimumHeightRequest="50"
184+
Padding="20,0"
185+
Text="CLOSE"
186+
TextColor="{DynamicResource PrimaryTextColor}"
187+
VerticalOptions="Fill"
188+
InputTransparent="True" />
189+
</core:SfEffectsView>
190+
<!-- Regular button for Android/iOS -->
191+
<Button x:Name="CloseButtonNoEffects"
157192
BackgroundColor="Transparent"
158193
BorderWidth="0"
159194
BorderColor="Transparent"
@@ -166,7 +201,8 @@
166201
Padding="20,0"
167202
Text="CLOSE"
168203
TextColor="{DynamicResource PrimaryTextColor}"
169-
VerticalOptions="Fill" />
204+
VerticalOptions="Fill"
205+
IsVisible="{OnPlatform Android=True, iOS=True, WinUI=False}" />
170206
</Border>
171207

172208
<!-- Busy Overlay -->

src/Bible.Alarm/Views/BiblePublications/SectionSelectionModal.xaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
xmlns:converters="clr-namespace:Bible.Alarm.Common.ViewHelpers.Converters"
1111
xmlns:behaviours="clr-namespace:Bible.Alarm.Common.ViewHelpers.Behaviours"
1212
xmlns:shared="clr-namespace:Bible.Alarm.Views.Shared"
13+
xmlns:sharedControls="clr-namespace:Bible.Alarm.Views.Shared;assembly=Bible.Alarm"
1314
xmlns:system="clr-namespace:System;assembly=System.Runtime"
15+
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
1416
x:DataType="bible:SectionSelectionViewModel"
1517
Padding="0,0,0,0">
1618
<ContentPage.Resources>
@@ -149,8 +151,41 @@
149151
Opacity="0.1"
150152
Radius="4" />
151153
</Border.Shadow>
152-
<Button
153-
x:Name="CloseButton"
154+
<!-- Close button - SfEffectsView for WinUI only -->
155+
<core:SfEffectsView x:Name="CloseButtonEffectsView"
156+
TouchDownEffects="Ripple"
157+
TouchUpEffects="None"
158+
RippleBackground="{DynamicResource PrimaryColor}"
159+
RippleAnimationDuration="200"
160+
ShouldIgnoreTouches="False"
161+
HorizontalOptions="Fill"
162+
VerticalOptions="Fill">
163+
<core:SfEffectsView.IsVisible>
164+
<OnPlatform x:TypeArguments="x:Boolean" Default="false">
165+
<On Platform="WinUI" Value="true" />
166+
</OnPlatform>
167+
</core:SfEffectsView.IsVisible>
168+
<core:SfEffectsView.GestureRecognizers>
169+
<TapGestureRecognizer Command="{Binding CloseModalCommand}" />
170+
</core:SfEffectsView.GestureRecognizers>
171+
<Button x:Name="CloseButton"
172+
BackgroundColor="Transparent"
173+
BorderWidth="0"
174+
BorderColor="Transparent"
175+
Command="{Binding CloseModalCommand}"
176+
CornerRadius="12"
177+
FontSize="{DynamicResource ButtonFontSize}"
178+
FontAttributes="Bold"
179+
HorizontalOptions="Fill"
180+
MinimumHeightRequest="50"
181+
Padding="20,0"
182+
Text="CLOSE"
183+
TextColor="{DynamicResource PrimaryTextColor}"
184+
VerticalOptions="Fill"
185+
InputTransparent="True" />
186+
</core:SfEffectsView>
187+
<!-- Regular button for Android/iOS -->
188+
<Button x:Name="CloseButtonNoEffects"
154189
BackgroundColor="Transparent"
155190
BorderWidth="0"
156191
BorderColor="Transparent"
@@ -163,7 +198,8 @@
163198
Padding="20,0"
164199
Text="CLOSE"
165200
TextColor="{DynamicResource PrimaryTextColor}"
166-
VerticalOptions="Fill" />
201+
VerticalOptions="Fill"
202+
IsVisible="{OnPlatform Android=True, iOS=True, WinUI=False}" />
167203
</Border>
168204

169205
<!-- Busy Overlay - visibility controlled from code-behind to prevent binding race conditions -->

src/Bible.Alarm/Views/BiblePublications/TrackSelectionModal.xaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
xmlns:converters="clr-namespace:Bible.Alarm.Common.ViewHelpers.Converters"
1111
xmlns:behaviours="clr-namespace:Bible.Alarm.Common.ViewHelpers.Behaviours"
1212
xmlns:shared="clr-namespace:Bible.Alarm.Views.Shared"
13+
xmlns:sharedControls="clr-namespace:Bible.Alarm.Views.Shared;assembly=Bible.Alarm"
1314
xmlns:system="clr-namespace:System;assembly=System.Runtime"
15+
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
1416
x:DataType="bible:TrackSelectionViewModel"
1517
Padding="0,0,0,0">
1618
<ContentPage.Resources>
@@ -150,8 +152,41 @@
150152
Opacity="0.1"
151153
Radius="4" />
152154
</Border.Shadow>
153-
<Button
154-
x:Name="CloseButton"
155+
<!-- Close button - SfEffectsView for WinUI only -->
156+
<core:SfEffectsView x:Name="CloseButtonEffectsView"
157+
TouchDownEffects="Ripple"
158+
TouchUpEffects="None"
159+
RippleBackground="{DynamicResource PrimaryColor}"
160+
RippleAnimationDuration="200"
161+
ShouldIgnoreTouches="False"
162+
HorizontalOptions="Fill"
163+
VerticalOptions="Fill">
164+
<core:SfEffectsView.IsVisible>
165+
<OnPlatform x:TypeArguments="x:Boolean" Default="false">
166+
<On Platform="WinUI" Value="true" />
167+
</OnPlatform>
168+
</core:SfEffectsView.IsVisible>
169+
<core:SfEffectsView.GestureRecognizers>
170+
<TapGestureRecognizer Command="{Binding CloseModalCommand}" />
171+
</core:SfEffectsView.GestureRecognizers>
172+
<Button x:Name="CloseButton"
173+
BackgroundColor="Transparent"
174+
BorderWidth="0"
175+
BorderColor="Transparent"
176+
Command="{Binding CloseModalCommand}"
177+
CornerRadius="12"
178+
FontSize="{DynamicResource ButtonFontSize}"
179+
FontAttributes="Bold"
180+
HorizontalOptions="Fill"
181+
MinimumHeightRequest="50"
182+
Padding="20,0"
183+
Text="CLOSE"
184+
TextColor="{DynamicResource PrimaryTextColor}"
185+
VerticalOptions="Fill"
186+
InputTransparent="True" />
187+
</core:SfEffectsView>
188+
<!-- Regular button for Android/iOS -->
189+
<Button x:Name="CloseButtonNoEffects"
155190
BackgroundColor="Transparent"
156191
BorderWidth="0"
157192
BorderColor="Transparent"
@@ -164,7 +199,8 @@
164199
Padding="20,0"
165200
Text="CLOSE"
166201
TextColor="{DynamicResource PrimaryTextColor}"
167-
VerticalOptions="Fill" />
202+
VerticalOptions="Fill"
203+
IsVisible="{OnPlatform Android=True, iOS=True, WinUI=False}" />
168204
</Border>
169205

170206
<!-- Busy Overlay -->

src/Bible.Alarm/Views/General/AlarmSettingsModal.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
HorizontalOptions="Fill"
6464
HorizontalTextAlignment="Center"
6565
LineBreakMode="WordWrap"
66-
Text="To ensure alarms work reliably, please configure these essential settings:&#10;&#10;1. Battery Optimization: Prevent the system from stopping alarms in the background&#10;2. Do Not Disturb: Allow alarms to play even when your device is in silent or DND mode"
66+
Text="To ensure alarms work reliably, please configure these essential settings:"
6767
TextColor="{DynamicResource TextPrimaryColor}"
6868
VerticalOptions="Start"
6969
VerticalTextAlignment="Start" />

0 commit comments

Comments
 (0)