Skip to content

Commit 9a7ae1f

Browse files
committed
Tweaks to Density of PhotoAlbum Layout
1 parent 47e133a commit 9a7ae1f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Files UWP/InstanceTabsView.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ public async void SetSelectedTabInfo(string text, string currentPathForTabIcon =
214214

215215
}
216216
tabIcon = fontIconSource;
217-
(tabView.TabItems[tabView.SelectedIndex] as TabViewItem).Header = tabLocationHeader;
218-
(tabView.TabItems[tabView.SelectedIndex] as TabViewItem).IconSource = tabIcon;
217+
(tabView.SelectedItem as TabViewItem).Header = tabLocationHeader;
218+
(tabView.SelectedItem as TabViewItem).IconSource = tabIcon;
219219
}
220220

221221
private void DragArea_Loaded(object sender, RoutedEventArgs e)

Files UWP/PhotoAlbum.xaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,12 @@
480480
</GridView.ItemContainerStyle>
481481
<GridView.ItemTemplate>
482482
<DataTemplate x:DataType="local2:ListedItem">
483-
<StackPanel IsRightTapEnabled="True" RightTapped="StackPanel_RightTapped" Width="150" Height="150" Tag="{x:Bind RowIndex}" Orientation="Vertical" Padding="0" ToolTipService.ToolTip="{Binding FileName}" Background="Transparent" Margin="0, 0, 0, 0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
484-
<Grid Tag="ItemImage" Width="150" Height="100">
483+
<Grid IsRightTapEnabled="True" RightTapped="StackPanel_RightTapped" Width="125" Height="125" Tag="{x:Bind RowIndex}" Padding="0" ToolTipService.ToolTip="{Binding FileName}" Background="Transparent" Margin="0, 0, 0, 0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
484+
<Grid.RowDefinitions>
485+
<RowDefinition Height="100"/>
486+
<RowDefinition Height="25"/>
487+
</Grid.RowDefinitions>
488+
<Grid Grid.Row="0" Tag="ItemImage" Width="125" Height="100">
485489
<Grid Padding="12" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="Picture" Visibility="{x:Bind FileIconVis}">
486490
<Image Stretch="Uniform" Source="{x:Bind FileImg}"/>
487491
</Grid>
@@ -496,8 +500,8 @@
496500
</Grid>
497501
</Grid>
498502
</Grid>
499-
<TextBlock MaxWidth="150" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{x:Bind FileName}" TextWrapping="Wrap"/>
500-
</StackPanel>
503+
<TextBlock Grid.Row="1" Margin="10,0" MaxHeight="25" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{x:Bind FileName}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"/>
504+
</Grid>
501505

502506
</DataTemplate>
503507
</GridView.ItemTemplate>

0 commit comments

Comments
 (0)