123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <UserControl x:Class="PRSDesktop.JobDocumentSetTree"
- 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:local="clr-namespace:PRSDesktop"
- xmlns:Syncfusion="http://schemas.syncfusion.com/wpf"
- xmlns:sfgrid="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="800">
- <UserControl.Resources>
- <local:JobDocumentSetDescriptionConverter x:Key="descriptionConverter" />
- <local:JobDocumentSetDetailsConverter x:Key="detailsConverter" />
- <local:JobDocumentSetMileStoneConverter x:Key="milestoneConverter" />
-
- <DataTemplate x:Key="descriptionTemplate">
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
-
- <TextBlock
- Grid.Row="0"
- Tag="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=Code}"
- VerticalAlignment="Center"
- FontWeight="Bold"
- Margin="10,2,0,0"
- />
-
- <TextBlock
- Grid.Row="1"
- Tag="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=Description}"
- VerticalAlignment="Center"
- Margin="10,0,0,0"
- />
-
- <TextBlock
- Grid.Row="2"
- Tag="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource descriptionConverter}, ConverterParameter=Tags}"
- FontStyle="Italic"
- VerticalAlignment="Center"
- Margin="10,0,0,2"
- />
-
-
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="detailsTemplate">
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
-
- <TextBlock
- Grid.Row="0"
- Tag="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=Size}"
- TextAlignment="Center"
- FontWeight="Bold"
- Margin="0,2,0,0"
- />
-
- <TextBlock
- Grid.Row="1"
- Tag="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=Employee}"
- TextAlignment="Center"
- />
-
- <TextBlock
- Grid.Row="2"
- Tag="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource detailsConverter}, ConverterParameter=Date}"
- TextAlignment="Center"
- Margin="0,0,0,2"
- />
-
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="milestoneTemplate">
- <Grid Background="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=Color}">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Row="0"
- Grid.Column="0"
- Tag="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=Revision}"
- TextAlignment="Center"
- VerticalAlignment="Center"
- FontWeight="Bold"
- Margin="0,2,0,0"
- />
-
- <Image
- Grid.Row="0"
- Grid.Column="1"
- Source="../../../../Resources/speechbubble.png"
- Width="16"
- Height="16"
- Tag="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=ID}"
- Visibility="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=Kanbans}" />
-
- <TextBlock
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Tag="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=Status}"
- TextAlignment="Center"
- />
-
- <TextBlock
- Grid.Row="2"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Tag="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=ID}"
- Text="{Binding Path=Value, Converter={StaticResource milestoneConverter}, ConverterParameter=Date}"
- TextAlignment="Center"
- Margin="0,0,0,2"
- />
-
- </Grid>
- </DataTemplate>
-
- <Style TargetType="Syncfusion:TreeGridHeaderCell" x:Key="headerStyle">
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="Background" Value="LightSkyBlue"/>
- </Style>
-
- <Style TargetType="Syncfusion:TreeGridStackedHeaderCell">
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="Background" Value="LightSkyBlue"/>
- </Style>
-
- <Style TargetType="Syncfusion:TreeGridRowControl" x:Key="rowStyle">
- <Setter Property="Background" Value="White"/>
- </Style>
-
- <!-- <Style TargetType="Syncfusion:TreeGridExpanderCell"> -->
- <!-- <Setter Property="Background" Value="LightSalmon"/> -->
- <!-- </Style> -->
-
- </UserControl.Resources>
- <Grid x:Name="ContainerGrid">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <!-- SelectionUnit="Cell" -->
- <!-- QueryRowHeight="DataGrid_OnQueryRowHeight" -->
- <Border x:Name="TreeBorder" AllowDrop="True"
- Drop="Grid_Drop">
- <Syncfusion:SfTreeGrid x:Name="treeGrid"
- Grid.Row="0"
- AutoGenerateColumns="False"
- ChildPropertyName="Children"
- AutoExpandMode="AllNodesExpanded"
- NodeCollapsing="TreeGrid_OnNodeCollapsing"
- RowHeight="60"
- AllowSorting="False"
- HeaderRowHeight="30"
- NavigationMode="Cell"
- SelectionMode="Extended"
- ColumnSizer="Auto"
- Background="DimGray"
- HeaderStyle="{StaticResource headerStyle}"
- RowStyle="{StaticResource rowStyle}"
- CellToolTipOpening="TreeGrid_OnCellToolTipOpening"
- ContextMenuOpening="TreeGrid_OnContextMenuOpening"
- ItemsSourceChanged="TreeGrid_OnItemsSourceChanged"
- SelectionChanged="TreeGrid_OnSelectionChanged"
- CurrentCellActivated="TreeGrid_OnCurrentCellActivated"
- CellDoubleTapped="TreeGrid_OnCellDoubleTapped"
- AllowDraggingRows="False"
- AllowDrop="False">
- <Syncfusion:SfTreeGrid.StackedHeaderRows>
- <Syncfusion:StackedHeaderRow x:Name="stackedHeaderRow" />
- </Syncfusion:SfTreeGrid.StackedHeaderRows>
- <Syncfusion:SfTreeGrid.ContextMenu>
- <ContextMenu x:Name="MileStoneMenu" />
- </Syncfusion:SfTreeGrid.ContextMenu>
- </Syncfusion:SfTreeGrid>
- </Border>
-
- <DockPanel Grid.Row="1">
- <Button x:Name="Add" DockPanel.Dock="Left" Margin="0,2,2,0" Width="30" Height="30"
- Padding="2" Click="Add_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Image x:Name="AddImage" Source="../../Resources/add.png" />
- </Button>
- <Button x:Name="Edit" DockPanel.Dock="Left" Margin="0,2,2,0" Width="30" Height="30"
- Padding="2" Click="Edit_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Image x:Name="EditImage" Source="../../Resources/pencil.png" />
- </Button>
- <Button x:Name="FlatList" DockPanel.Dock="Left" Margin="0,2,2,0"
- Click="FlatList_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Label x:Name="FlatListLabel" Content="Flat List" />
- </Button>
- <Button x:Name="HideRejected" DockPanel.Dock="Left" Margin="0,2,2,0"
- Click="HideRejected_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Label x:Name="HideSupercededLabel" Content="Last Only" />
- </Button>
- <Button x:Name="IncludeRetired" DockPanel.Dock="Left" Margin="0,2,2,0"
- Click="IncludeRetired_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Label x:Name="IncludeRetiredLabel" Content="Include Retired" />
- </Button>
- <Button x:Name="Export" DockPanel.Dock="Left" Margin="0,2,2,0"
- Click="Export_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Label x:Name="ExportLabel" Content="Export" />
- </Button>
- <Button x:Name="Delete" DockPanel.Dock="Right" Margin="2,2,0,0" Width="30" Height="30"
- Padding="2" Click="Delete_OnClick" BorderBrush="Gray" BorderThickness="0.75">
- <Image x:Name="DeleteImage" Source="../../Resources/delete.png" />
- </Button>
- <Label x:Name="DocumentCount" DockPanel.Dock="Left" Content="0 Document Sets" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
- </DockPanel>
- </Grid>
- </UserControl>
|