Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ItemsControl ItemsSource="{Binding MeasureCharacteristicsByType}" Name="Items" >
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Expander Name="MCbyType" Style="{DynamicResource MyExpanderStyle}" BorderThickness="0,0,0,1" BorderBrush="#FFF0F0F0">
- <Expander.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal" DataContext="{Binding Path=DataContext, ElementName=MCbyType}" Margin="0,7,0,7" >
- <TextBlock FontSize="16" Text="{Binding CharacteristicType.Name.ActualTranslation}"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </Expander.HeaderTemplate>
- <ItemsControl ItemsSource="{Binding GroupedCharacteristicMeasures}" Padding="20,0,0,0">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Expander Name="GroupedMC" Style="{DynamicResource MyExpanderStyle1}" Margin="0" BorderThickness="0">
- <Expander.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal" DataContext="{Binding Path=DataContext, ElementName=GroupedMC}" Margin="0,7,0,7">
- <StackPanel Orientation="Horizontal" Width="400" >
- <TextBlock FontSize="14" Text="{lex:Loc Characteristic}" FontWeight="Bold"></TextBlock>
- <TextBlock FontSize="14" Text=": " FontWeight="Bold"></TextBlock>
- <TextBlock FontSize="14" Text="{Binding Characteristic}"></TextBlock>
- <TextBlock FontSize="14" Text=" - "></TextBlock>
- <TextBlock FontSize="14" Text="{Binding Characteristic.Area.Name.ActualTranslation}"></TextBlock>
- <TextBlock FontSize="14" Text=" "></TextBlock>
- <TextBlock FontSize="14" Text="{Binding AreaItem.Value}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Width="400" >
- <TextBlock FontSize="14" Text="{lex:Loc Line}" FontWeight="Bold"></TextBlock>
- <TextBlock FontSize="14" Text=": " FontWeight="Bold"></TextBlock>
- <TextBlock FontSize="14" Text="{Binding Line.Number}"></TextBlock>
- <TextBlock FontSize="14" Text=" - "></TextBlock>
- <TextBlock FontSize="14" Text="{Binding Line.CostCenter.Name.ActualTranslation}"></TextBlock>
- <TextBlock FontSize="14" Text=", "></TextBlock>
- <TextBlock FontSize="14" Text="{Binding Line.CostCenter.Site.Name.ActualTranslation}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal" >
- <ProgressBar Value="{Binding Progress, Mode=OneWay}" Width="200"></ProgressBar>
- <TextBlock Text=" " />
- <TextBlock Text="{Binding Status}" />
- </StackPanel>
- </StackPanel>
- </DataTemplate>
- </Expander.HeaderTemplate>
- <ItemsControl Margin="15,0,0,0">
- <ItemsControl.Resources>
- <CollectionViewSource x:Key="SortedMeasures" Source="{Binding Measures}">
- <CollectionViewSource.SortDescriptions>
- <scm:SortDescription PropertyName="Number"></scm:SortDescription>
- </CollectionViewSource.SortDescriptions>
- </CollectionViewSource>
- </ItemsControl.Resources>
- <ItemsControl.ItemsSource>
- <Binding Source="{StaticResource SortedMeasures}" />
- </ItemsControl.ItemsSource>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid MouseLeftButtonUp="Measure_OnMouseLeftButtonUp" Margin="20,0,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="810"></ColumnDefinition>
- <ColumnDefinition Width="*" ></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.Style>
- <Style TargetType="Grid">
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="DockPanel.Background" Value="#FF41B1E1"></Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
- <DockPanel HorizontalAlignment="Stretch">
- <Label Width="Auto" DockPanel.Dock="Left">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{lex:LocText Measure, Suffix=' ' }"></TextBlock>
- <TextBlock Text="{Binding Number}"></TextBlock>
- </StackPanel>
- </Label>
- </DockPanel>
- <ProgressBar Value="{Binding Progress, Mode=OneWay}" Width="200" Grid.Column="1" HorizontalAlignment="Left" ></ProgressBar>
- <Label Content="{Binding Status, Mode=OneWay}" Margin="200,0,0,0" Grid.Column="1" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Expander>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Expander>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
Advertisement
Add Comment
Please, Sign In to add comment