BreadcrumbBar.xaml #1

  • //
  • guest/
  • christoph_leithner/
  • piper/
  • main/
  • windows/
  • R1.1/
  • Perforce/
  • View/
  • BreadcrumbBar.xaml
  • View
  • Commits
  • Open Download .zip Download (3 KB)
<UserControl x:Class="Perforce.View.BreadcrumbBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:view="clr-namespace:Perforce.View"
             Background="#EBEAE5"
             mc:Ignorable="d" Height="40">
    <ItemsControl Name="Breadcrumbs" ItemsSource="{Binding BreadcrumbItems}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <VirtualizingStackPanel Orientation="Horizontal"/>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>

        <!-- Add this Template -->
        <ItemsControl.Template>
            <ControlTemplate TargetType="ItemsControl">
                <ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled">
                    <ScrollViewer.Resources>
                        <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarHeightKey}">5</sys:Double>
                    </ScrollViewer.Resources>
                    <ItemsPresenter>
                    </ItemsPresenter>
                </ScrollViewer>
            </ControlTemplate>
        </ItemsControl.Template>

        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal" Background="#00000000" MouseUp="Breadcrumb_MouseUp">
                    <Image Width="32" Height="32" VerticalAlignment="Center">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsFolder}" Value="True">
                                        <Setter Property="Source" Value="../Resources/Icons/IconFolder.png" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding IsFolder}" Value="False">
                                        <Setter Property="Source" Value="../Resources/Icons/IconFile.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                    <Border VerticalAlignment="Center">
                        <TextBlock Name="label" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding Label}" FontSize="16" />
                    </Border>
                    <Image Width="32" Height="32" VerticalAlignment="Center">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsFolder}" Value="True">
                                        <Setter Property="Source" Value="../Resources/ColumnArrow48.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </StackPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</UserControl>
# Change User Description Committed
#1 16817 christoph_leithner "Forking branch Main of perforce-software-piper to christoph_leithner-piper."
//guest/perforce_software/piper/main/windows/R1.1/Perforce/View/BreadcrumbBar.xaml
#1 16507 perforce_software Move to main branch.
//guest/perforce_software/piper/windows/R1.1/Perforce/View/BreadcrumbBar.xaml
#3 16474 Robert Cowham Bring up-to-date with //guest/perforce_software/piper/windows/main/...@16473
#2 13572 alan_petersen updating R1.1
#1 11256 alan_petersen Populate //guest/perforce_software/piper/windows/R1.1/...
from //guest/perforce_software/piper/windows/main/....
//guest/perforce_software/piper/windows/main/Perforce/View/BreadcrumbBar.xaml
#1 11255 alan_petersen Rename/move file(s)
//guest/perforce_software/piper/windows/Perforce/View/BreadcrumbBar.xaml
#1 10761 alan_petersen initial drop of Piper for Windows....

this version still has _many_ bugs (er... i mean "unintended features") but I will be updating it over the next week as more stability is added.