Skip to content

Commit

Permalink
Merge pull request #564 from AndreasReitberger/563-use-button-for-swi…
Browse files Browse the repository at this point in the history
…tchheaderconventview

Restored `SwitchHeaderConventView`
  • Loading branch information
AndreasReitberger authored Sep 21, 2024
2 parents 3302dbd + ca22089 commit 5d0dce4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
HorizontalOptions="FillAndExpand"
ColumnDefinitions="Auto,*,Auto"
>
<!-- Back Button -->
<Button
HeightRequest="{OnPlatform Android=40, Default=50}"
Margin="0"
Padding="0"
Command="{TemplateBinding BackButtonCommand}"
CommandParameter="{Binding .}"
CornerRadius="0"
Text="{TemplateBinding BackButtonIconText}"
FontFamily="{TemplateBinding ButtonIconFontFamily}"
Style="{StaticResource Style.Core.Button.IconPrimary.MaterialDesign}"
/>
<!-- Workaround (not needed any more)
<Label
Style="{StaticResource Style.Core.Label.Header}"
VerticalTextAlignment="Center"
Expand All @@ -35,6 +48,7 @@
/>
</Label.GestureRecognizers>
</Label>
-->
<Label
Grid.Column="1"
FormattedText="{TemplateBinding TitleLabelFormattedString}"
Expand All @@ -43,6 +57,20 @@
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"
/>
<!-- Next Button -->
<Button
HeightRequest="{OnPlatform Android=40, Default=50}"
Grid.Column="2"
Margin="0"
Padding="0"
Command="{TemplateBinding BackButtonCommand}"
CommandParameter="{Binding .}"
CornerRadius="0"
Text="{TemplateBinding NextButtonIconText}"
FontFamily="{TemplateBinding ButtonIconFontFamily}"
Style="{StaticResource Style.Core.Button.IconPrimary.MaterialDesign}"
/>
<!-- Workaround (not needed any more)
<Label
Grid.Column="2"
Style="{StaticResource Style.Core.Label.Header}"
Expand All @@ -67,6 +95,7 @@
/>
</Label.GestureRecognizers>
</Label>
-->
</Grid>
</ControlTemplate>
</ContentView.ControlTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@
<VisualState.Setters>
<Setter Property="OnColor" Value="{OnPlatform Android={DynamicResource PrimaryColorLight}, Default={AppThemeBinding Light={StaticResource LightGreen}, Dark={StaticResource LightGreen}}}" />
<Setter Property="ThumbColor" Value="{OnPlatform Android={DynamicResource PrimaryColor}, Default={StaticResource White}}" />
<!--<Setter Property="ThumbColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={StaticResource White}}" />-->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Off">
<VisualState.Setters>
<Setter Property="ThumbColor" Value="{StaticResource White}" />
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray700}}" />
<!--<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />-->
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand Down

0 comments on commit 5d0dce4

Please sign in to comment.