Files
modernkeepass/ModernKeePass/Views/UserControls/BreadCrumbUserControl.xaml

47 lines
2.8 KiB
Plaintext
Raw Normal View History

<UserControl x:Name="UserControl"
x:Class="ModernKeePass.Views.UserControls.BreadCrumbUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:templateSelectors="using:ModernKeePass.TemplateSelectors"
mc:Ignorable="d">
<ItemsControl ItemsSource="{Binding ItemsSource, ElementName=UserControl}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate x:Name="FirstItemTemplate">
<HyperlinkButton Foreground="{StaticResource MainColor}" Content="{Binding Title}" Style="{StaticResource MainColorHyperlinkButton}" FontWeight="Light" FontSize="12" Padding="0">
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Click">
<core:NavigateToPageAction Parameter="{Binding}" TargetPage="ModernKeePass.Views.GroupDetailPage" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</HyperlinkButton>
</DataTemplate>
<DataTemplate x:Name="OtherItemsTemplate">
<StackPanel Orientation="Horizontal">
2018-06-14 10:50:16 +02:00
<Viewbox MaxHeight="10" Margin="0,2,0,0">
<SymbolIcon Symbol="Forward" />
</Viewbox>
<HyperlinkButton Foreground="{StaticResource MainColor}" Content="{Binding Title}" Style="{StaticResource MainColorHyperlinkButton}" FontWeight="Light" FontSize="12" Padding="0">
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Click">
<core:NavigateToPageAction Parameter="{Binding}" TargetPage="ModernKeePass.Views.GroupDetailPage" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</HyperlinkButton>
</StackPanel>
</DataTemplate>
</ItemsControl.Resources>
<ItemsControl.ItemTemplateSelector>
<templateSelectors:FirstItemDataTemplateSelector FirstItem="{StaticResource FirstItemTemplate}" OtherItem="{StaticResource OtherItemsTemplate}"/>
</ItemsControl.ItemTemplateSelector>
</ItemsControl>
</UserControl>