Fixed visual inconsistency for the image resizer sizes listview

This commit is contained in:
Niels Laute 2020-05-05 22:47:59 +02:00
parent b0bc57466e
commit e66e5e6f6e

View File

@ -50,8 +50,7 @@
<TextBlock x:Uid="ImageResizer_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="ImageResizer_EnableToggle" IsOn="{ Binding Mode=TwoWay, Path=IsEnabled, Source={StaticResource ViewModel}}"
Margin="{StaticResource SmallTopMargin}" />
<ToggleSwitch x:Uid="ImageResizer_EnableToggle" IsOn="{ Binding Mode=TwoWay, Path=IsEnabled, Source={StaticResource ViewModel}}"/>
<TextBlock x:Uid="ImageResizer_CustomSizes"
Style="{StaticResource SettingsGroupTitleStyle}"/>
@ -60,8 +59,10 @@
<ListView x:Name="ImagesSizesListView"
ItemsSource="{Binding Sizes, Mode=TwoWay, Source={StaticResource ViewModel}}"
Padding="0"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled, Source={StaticResource ViewModel}}"
Margin="0">
Margin="0"
SelectionMode="None"
>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
@ -95,15 +96,17 @@
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplate x:Name="SingleLineDataTemplate" x:DataType="models:ImageSize" >
<StackPanel Orientation="Horizontal" Padding="0" Spacing="4">
<StackPanel Orientation="Horizontal" Height="48" Padding="0" Spacing="4">
<TextBox Text="{x:Bind Path=Name, Mode=TwoWay}"
Width="90"
Height="35"
Width="90"
VerticalAlignment="Center"
Height="34"
Margin="{StaticResource SmallTopMargin}"/>
<ComboBox SelectedIndex="{x:Bind Path=Fit, Mode=TwoWay}"
Width="90"
Height="35"
Width="90"
VerticalAlignment="Center"
Height="34"
Margin="{StaticResource SmallTopMargin}">
<ComboBoxItem x:Uid="ImageResizer_Sizes_Fit_Fill" />
<ComboBoxItem x:Uid="ImageResizer_Sizes_Fit_Fit" />
@ -113,37 +116,42 @@
<muxc:NumberBox Value="{x:Bind Path=Width, Mode=TwoWay}"
Width="68"
Height="34"
VerticalAlignment="Center"
Margin="{StaticResource SmallTopMargin}"/>
<TextBlock Text="x"
FontWeight="SemiBold"
TextAlignment="Center"
<TextBlock Text="&#xE711;"
FontFamily="Segoe MDL2 Assets"
TextAlignment="Center"
VerticalAlignment="Center"
Margin="{StaticResource SmallTopMargin}"
Width="25"
Height="35"/>
Width="25"/>
<muxc:NumberBox Value="{x:Bind Path=Height, Mode=TwoWay}"
Width="68"
Width="68"
Height="34"
VerticalAlignment="Center"
Margin="{StaticResource SmallTopMargin}"/>
<ComboBox SelectedIndex="{Binding Path=Unit, Mode=TwoWay}"
Width="90"
Height="35"
Width="90"
Height="34"
VerticalAlignment="Center"
Margin="{StaticResource SmallTopMargin}">
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_CM" />
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_Inches" />
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_Percent" />
<ComboBoxItem x:Uid="ImageResizer_Sizes_Units_Pixels" />
</ComboBox>
<AppBarButton x:Name="RemoveButton"
<Button x:Name="RemoveButton"
Background="Transparent"
Command = "{Binding DeleteImageSizeEventHandler, Source={StaticResource ViewModel}}"
CommandParameter="{Binding Id}"
Icon="Delete"
Width="52"
Height="32"
Margin="{StaticResource SmallTopMargin}" Padding="0,0,50,100" UseLayoutRounding="False"/>
FontFamily="Segoe MDL2 Assets"
Height="34"
Width="34"
Content="&#xE74D;"
VerticalAlignment="Center"
Margin="{StaticResource SmallTopMargin}" UseLayoutRounding="False"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>