Skip to content

Commit

Permalink
fix(ComboBox): cupertino combo ItemTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Mar 9, 2023
1 parent 839fce1 commit 117d863
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/library/Uno.Cupertino/Styles/Controls/ComboBox.xaml
Expand Up @@ -25,6 +25,8 @@
TargetType="ComboBoxItem">
<Setter Property="FontFamily"
Value="{ThemeResource CupertinoFontFamily}" />
<Setter Property="FontSize"
Value="13" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="VerticalContentAlignment"
Expand All @@ -34,7 +36,7 @@
<Setter Property="CornerRadius"
Value="5" />
<Setter Property="Padding"
Value="0" />
Value="16, 0" />
<Setter Property="Height"
Value="43" />

Expand Down Expand Up @@ -107,7 +109,6 @@

<!-- Pressed Overlay -->
<Grid x:Name="PressedOverlay"
Margin="10"
Background="{ThemeResource CupertinoSecondarySystemFillBrush}"
CornerRadius="{TemplateBinding CornerRadius}"
IsHitTestVisible="False"
Expand All @@ -117,19 +118,13 @@

<!-- ContentPresenter-->
<ContentPresenter x:Name="ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
ContentTransitions="{TemplateBinding ContentTransitions}"
Content="{TemplateBinding Content}">
<ContentPresenter.ContentTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding}"
Style="{ThemeResource CupertinoFootnote}"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
</DataTemplate>
</ContentPresenter.ContentTemplate>
</ContentPresenter>
Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down Expand Up @@ -303,6 +298,7 @@
<!-- ContentPresenter -->
<ContentPresenter x:Name="ContentPresenter"
Grid.Column="1"
MaxLines="1"
VerticalAlignment="Center"
Foreground="{ThemeResource CupertinoTertiaryGrayBrush}" />

Expand Down

0 comments on commit 117d863

Please sign in to comment.