<UserControl x:Class="Perforce.View.SidebarSelector" 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" mc:Ignorable="d" MouseUp="Detected_MouseClick" d:DesignHeight="35" d:DesignWidth="200"> <Grid Name="EntireSelector"> <Grid.Resources> <ContextMenu x:Key="contextMenu"> <ContextMenu.Items> <MenuItem Header="Edit" Click="MenuItem_Click" /> <MenuItem Header="Delete" Click="MenuItem_Click" /> </ContextMenu.Items> </ContextMenu> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition Width="158" /> <ColumnDefinition Width="2"/> <ColumnDefinition Width="40"/> </Grid.ColumnDefinitions> <TextBox Height="40" Name="EditBox" VerticalContentAlignment="Center" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Segoe UI Semibold" FontSize="14" Visibility="Hidden" KeyDown="EditBox_KeyDown" /> <Label Height="40" Name="MainLabel" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Content="{Binding LabelText}" FontFamily="Segoe UI Semibold" FontSize="14"> <Label.Style> <Style TargetType="Label"> <Setter Property="Background" Value="#EBEAE5" /> <Setter Property="Foreground" Value="#000000"/> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected}" Value="True"> <Setter Property="Background" Value="#8DA2B2" /> <Setter Property="Foreground" Value="#EBEAE5" /> </DataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding ElementName=EntireSelector,Path=IsMouseOver}" Value="True" /> <Condition Binding="{Binding IsSelected}" Value="False" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="Background" Value="#B5B4B1" /> <Setter Property="Foreground" Value="#EBEAE5" /> </MultiDataTrigger.Setters> </MultiDataTrigger> </Style.Triggers> </Style> </Label.Style> </Label> <Label Height="40" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="2" FontFamily="Segoe UI Semibold" FontSize="14"> <Label.Style> <Style TargetType="Label"> <Setter Property="Background" Value="#EBEAE5" /> <Setter Property="Foreground" Value="#000000" /> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected}" Value="True"> <Setter Property="Background" Value="#708796" /> <Setter Property="Foreground" Value="#EBEAE5" /> </DataTrigger> <DataTrigger Binding="{Binding HasCount}" Value="True"> <Setter Property="HorizontalContentAlignment" Value="Right" /> <Setter Property="Content" Value="{Binding LabelCount}" /> </DataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding ElementName=EntireSelector,Path=IsMouseOver}" Value="True" /> <Condition Binding="{Binding IsSelected}" Value="False" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="Background" Value="#7D797A" /> </MultiDataTrigger.Setters> </MultiDataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding IsSelected}" Value="True" /> <Condition Binding="{Binding HasCount}" Value="False" /> <Condition Binding="{Binding IsEditable}" Value="False" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Content"> <Setter.Value> <Image Source="/Perforce;component/Resources/ButtonRight.png" Width="18" Height="18" /> </Setter.Value> </Setter> </MultiDataTrigger.Setters> </MultiDataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding ElementName=EntireSelector,Path=IsMouseOver}" Value="True" /> <Condition Binding="{Binding HasCount}" Value="False" /> <Condition Binding="{Binding IsEditable}" Value="False" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Content"> <Setter.Value> <Image Source="/Perforce;component/Resources/ButtonRight.png" Width="18" Height="18" /> </Setter.Value> </Setter> </MultiDataTrigger.Setters> </MultiDataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding IsSelected}" Value="True" /> <Condition Binding="{Binding HasCount}" Value="False" /> <Condition Binding="{Binding IsEditable}" Value="True" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Content"> <Setter.Value> <Image Source="/Perforce;component/Resources/ButtonEdit.png" Width="18" Height="18" /> </Setter.Value> </Setter> <Setter Property="ContextMenu" Value="{StaticResource contextMenu}" /> </MultiDataTrigger.Setters> </MultiDataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding ElementName=EntireSelector,Path=IsMouseOver}" Value="True" /> <Condition Binding="{Binding HasCount}" Value="False" /> <Condition Binding="{Binding IsEditable}" Value="True" /> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Content"> <Setter.Value> <Image Source="/Perforce;component/Resources/ButtonEdit.png" Width="18" Height="18" /> </Setter.Value> </Setter> <Setter Property="ContextMenu" Value="{StaticResource contextMenu}" /> </MultiDataTrigger.Setters> </MultiDataTrigger> </Style.Triggers> </Style> </Label.Style> </Label> </Grid> </UserControl>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15071 | alan_petersen |
Populate -o //guest/perforce_software/piper/... //guest/alan_petersen/piper/.... |
||
//guest/perforce_software/piper/windows/main/Perforce/View/SidebarSelector.xaml | |||||
#1 | 11255 | alan_petersen | Rename/move file(s) | ||
//guest/perforce_software/piper/windows/Perforce/View/SidebarSelector.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. |