Skip to content

Commit

Permalink
Win10: Fixed ItemContainerStyle of NewsMenuItemContainerStyle making …
Browse files Browse the repository at this point in the history
…no items selectable
  • Loading branch information
ge2301 committed Oct 29, 2018
1 parent c8dc6a4 commit 11cc075
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,33 @@
</Setter>
</Style>

<!-- An item list container represented by a standard "Button", scrolling its "ItemLabel" label when focused -->
<Style x:Key="NewsMenuItemContainerStyle" BasedOn="{ThemeResource DefaultItemContainerStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Button Style="{ThemeResource MenuButtonWideStyle}" Margin="80,0,51,0"
Command="{DynamicResource ResourceKey=Menu_Command}"
IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}">
<Button.Triggers>
<Trigger Property="HasFocus" Value="True">
<Setter TargetName="ItemLabel" Property="Opacity" Value="1"/>
<Setter TargetName="ItemLabel" Property="Color" Value="{ThemeResource TextColor}"/>
<Setter TargetName="ItemLabel" Property="Scroll" Value="Auto"/>
<Setter Property="StackPanel.ZIndex" Value="100.0"/>
</Trigger>
</Button.Triggers>
</Button>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- ListView style to be used for the list in the news feeds configuration dialog -->
<Style x:Key="NewsFeedsBookmarksListViewStyle" BasedOn="{ThemeResource ContentsMenuListViewStyle}">
<Setter Property="ItemTemplate" Value="{ThemeResource NewsFeedBookmarkItemDataTemplate}"/>
<Setter Property="Background" Value="{ThemeResource ItemsControlDialogShadowBackgroundColor}"/>
<Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultHighlightableItemContainerStyle}"/>
<Setter Property="ItemContainerStyle" Value="{ThemeResource NewsMenuItemContainerStyle}"/>
</Style>

</ResourceDictionary>

0 comments on commit 11cc075

Please sign in to comment.