Skip to content

Commit f3ceaa4

Browse files
committed
Remove unnecessary Reveal from PathBox items
1 parent 5523fcf commit f3ceaa4

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

Files/Controls/RibbonArea.xaml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,44 @@
875875
</Setter.Value>
876876
</Setter>
877877
</Style>
878+
<Style x:Key="ListViewItemContainerStyle_NoRevealBorder" TargetType="ListViewItem">
879+
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
880+
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
881+
<Setter Property="Background" Value="{ThemeResource ListViewItemBackground}"/>
882+
<Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}"/>
883+
<Setter Property="TabNavigation" Value="Local"/>
884+
<Setter Property="IsHoldingEnabled" Value="True"/>
885+
<Setter Property="Padding" Value="5,0,0,0"/>
886+
<Setter Property="HorizontalContentAlignment" Value="Left"/>
887+
<Setter Property="VerticalContentAlignment" Value="Center"/>
888+
<Setter Property="MinWidth" Value="8"/>
889+
<Setter Property="MinHeight" Value="20"/>
890+
<Setter Property="AllowDrop" Value="False"/>
891+
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}"/>
892+
<Setter Property="FocusVisualMargin" Value="0"/>
893+
<Setter Property="Template">
894+
<Setter.Value>
895+
<ControlTemplate TargetType="ListViewItem">
896+
<ListViewItemPresenter x:Name="Root" CheckBrush="{ThemeResource ListViewItemCheckBrush}" ContentMargin="{TemplateBinding Padding}" CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}" ContentTransitions="{TemplateBinding ContentTransitions}" CheckMode="{ThemeResource ListViewItemCheckMode}" DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" DragBackground="{ThemeResource ListViewItemDragBackground}" DragForeground="{ThemeResource ListViewItemDragForeground}" FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}" FocusVisualMargin="{TemplateBinding FocusVisualMargin}" FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Control.IsTemplateFocusTarget="True" PressedBackground="{ThemeResource ListViewItemBackgroundPressed}" PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}" PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}" PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}" RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}" ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}" RevealBackground="{ThemeResource ListViewItemRevealBackground}" SelectedForeground="{ThemeResource ListViewItemForegroundSelected}" SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}" SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}" SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}" SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
897+
<VisualStateManager.VisualStateGroups>
898+
<VisualStateGroup x:Name="CommonStates">
899+
<VisualState x:Name="Normal"/>
900+
<VisualState x:Name="Selected"/>
901+
</VisualStateGroup>
902+
<VisualStateGroup x:Name="DisabledStates">
903+
<VisualState x:Name="Enabled"/>
904+
<VisualState x:Name="Disabled">
905+
<VisualState.Setters>
906+
<Setter Target="Root.RevealBorderThickness" Value="0"/>
907+
</VisualState.Setters>
908+
</VisualState>
909+
</VisualStateGroup>
910+
</VisualStateManager.VisualStateGroups>
911+
</ListViewItemPresenter>
912+
</ControlTemplate>
913+
</Setter.Value>
914+
</Setter>
915+
</Style>
878916

879917
</UserControl.Resources>
880918

@@ -1164,14 +1202,14 @@
11641202
<MenuFlyoutItem x:Name="ManualPathEntryItem" Text="Edit address" Icon="Edit" Click="ManualPathEntryItem_Click"/>
11651203
</MenuFlyout>
11661204
</Grid.ContextFlyout>
1167-
<ListView Background="{ThemeResource TextControlBackground}" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto"
1205+
<ListView ItemContainerStyle="{StaticResource ListViewItemContainerStyle_NoRevealBorder}" Background="{ThemeResource TextControlBackground}" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto"
11681206
ScrollViewer.HorizontalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Disabled"
11691207
ItemClick="PathViewInteract_ItemClick" ItemsSource="{x:Bind parentPage.pathBoxItems}" HorizontalContentAlignment="Stretch" x:Name="PathViewInteract" SelectionMode="None" IsItemClickEnabled="True" SelectionChanged="ClickablePathView_SelectionChanged" VerticalContentAlignment="Stretch" CanReorderItems="False" VerticalAlignment="Stretch">
11701208
<ListView.ItemTemplate>
11711209
<DataTemplate>
11721210
<Grid x:Name="ListViewItemContentGrid" Tag="{Binding Path}" Background="Transparent">
11731211
<StackPanel Spacing="5" Orientation="Horizontal">
1174-
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" FontSize="14" Margin="0,0,0,4"/>
1212+
<TextBlock Text="{Binding Title}" FontWeight="Medium" FontSize="14" Margin="0,0,0,4"/>
11751213
<FontIcon FontSize="8" Glyph="&#xE76C;"/>
11761214
</StackPanel>
11771215
</Grid>
@@ -1182,14 +1220,14 @@
11821220
<StackPanel Background="Transparent" Orientation="Horizontal" />
11831221
</ItemsPanelTemplate>
11841222
</ListView.ItemsPanel>
1185-
<ListView.ItemContainerStyle>
1223+
<!--<ListView.ItemContainerStyle>
11861224
<Style TargetType="ListViewItem">
11871225
<Setter Property="Padding" Value="5,0,0,0"/>
11881226
<Setter Property="MinHeight" Value="20"/>
11891227
<Setter Property="MinWidth" Value="8"/>
11901228
<Setter Property="BorderThickness" Value="0"/>
11911229
</Style>
1192-
</ListView.ItemContainerStyle>
1230+
</ListView.ItemContainerStyle>-->
11931231
</ListView>
11941232
</Grid>
11951233
</Grid>

0 commit comments

Comments
 (0)