Guest User

Untitled

a guest
Mar 26th, 2013
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   <ItemsControl ItemsSource="{Binding MeasureCharacteristicsByType}" Name="Items" >
  2.       <ItemsControl.ItemTemplate>
  3.           <DataTemplate>
  4.  
  5.               <Expander Name="MCbyType" Style="{DynamicResource MyExpanderStyle}" BorderThickness="0,0,0,1" BorderBrush="#FFF0F0F0">
  6.        
  7.                   <Expander.HeaderTemplate>
  8.                       <DataTemplate>
  9.                           <StackPanel Orientation="Horizontal" DataContext="{Binding Path=DataContext, ElementName=MCbyType}" Margin="0,7,0,7" >
  10.                               <TextBlock FontSize="16" Text="{Binding CharacteristicType.Name.ActualTranslation}"></TextBlock>
  11.                           </StackPanel>
  12.                       </DataTemplate>
  13.                   </Expander.HeaderTemplate>
  14.                   <ItemsControl ItemsSource="{Binding GroupedCharacteristicMeasures}" Padding="20,0,0,0">
  15.                       <ItemsControl.ItemTemplate>
  16.                           <DataTemplate>
  17.                               <Expander Name="GroupedMC" Style="{DynamicResource MyExpanderStyle1}" Margin="0" BorderThickness="0">    
  18.                                   <Expander.HeaderTemplate>
  19.                                       <DataTemplate>
  20.                                           <StackPanel Orientation="Horizontal" DataContext="{Binding Path=DataContext, ElementName=GroupedMC}" Margin="0,7,0,7">
  21.                                               <StackPanel Orientation="Horizontal" Width="400"  >
  22.                                                   <TextBlock FontSize="14" Text="{lex:Loc Characteristic}" FontWeight="Bold"></TextBlock>
  23.                                                   <TextBlock FontSize="14" Text=": " FontWeight="Bold"></TextBlock>
  24.                                                   <TextBlock FontSize="14" Text="{Binding Characteristic}"></TextBlock>
  25.                                                   <TextBlock FontSize="14" Text=" - "></TextBlock>
  26.                                                   <TextBlock FontSize="14" Text="{Binding Characteristic.Area.Name.ActualTranslation}"></TextBlock>
  27.                                                   <TextBlock FontSize="14" Text=" "></TextBlock>
  28.                                                   <TextBlock FontSize="14" Text="{Binding AreaItem.Value}"></TextBlock>
  29.                                               </StackPanel>
  30.                                               <StackPanel Orientation="Horizontal" Width="400" >
  31.                                                   <TextBlock FontSize="14" Text="{lex:Loc Line}" FontWeight="Bold"></TextBlock>
  32.                                                   <TextBlock FontSize="14" Text=": " FontWeight="Bold"></TextBlock>
  33.                                                   <TextBlock FontSize="14" Text="{Binding Line.Number}"></TextBlock>
  34.                                                   <TextBlock FontSize="14" Text=" - "></TextBlock>
  35.                                                   <TextBlock FontSize="14" Text="{Binding Line.CostCenter.Name.ActualTranslation}"></TextBlock>
  36.                                                   <TextBlock FontSize="14" Text=", "></TextBlock>
  37.                                                   <TextBlock FontSize="14" Text="{Binding Line.CostCenter.Site.Name.ActualTranslation}"></TextBlock>
  38.                                               </StackPanel>
  39.                                               <StackPanel Orientation="Horizontal" >
  40.                                                   <ProgressBar Value="{Binding Progress, Mode=OneWay}" Width="200"></ProgressBar>
  41.                                                   <TextBlock Text=" " />
  42.                                                   <TextBlock Text="{Binding Status}" />
  43.                                               </StackPanel>
  44.                                           </StackPanel>
  45.                                       </DataTemplate>
  46.                                   </Expander.HeaderTemplate>                                          
  47.                                       <ItemsControl  Margin="15,0,0,0">
  48.  
  49.                                           <ItemsControl.Resources>
  50.                                               <CollectionViewSource x:Key="SortedMeasures" Source="{Binding Measures}">
  51.                                                   <CollectionViewSource.SortDescriptions>
  52.                                                       <scm:SortDescription PropertyName="Number"></scm:SortDescription>
  53.                                                   </CollectionViewSource.SortDescriptions>
  54.                                               </CollectionViewSource>
  55.                                           </ItemsControl.Resources>
  56.  
  57.                                           <ItemsControl.ItemsSource>
  58.                                               <Binding Source="{StaticResource SortedMeasures}" />
  59.                                           </ItemsControl.ItemsSource>
  60.                                              
  61.                                           <ItemsControl.ItemTemplate>
  62.                                               <DataTemplate>
  63.  
  64.                                                   <Grid MouseLeftButtonUp="Measure_OnMouseLeftButtonUp"  Margin="20,0,0,0">
  65.                                                       <Grid.ColumnDefinitions>
  66.                                                           <ColumnDefinition Width="810"></ColumnDefinition>
  67.                                                           <ColumnDefinition Width="*" ></ColumnDefinition>
  68.                                                       </Grid.ColumnDefinitions>
  69.                                                       <Grid.Style>
  70.                                                           <Style TargetType="Grid">
  71.                                                               <Style.Triggers>
  72.                                                                   <Trigger Property="IsMouseOver" Value="True">
  73.                                                                       <Setter Property="DockPanel.Background" Value="#FF41B1E1"></Setter>
  74.                                                                   </Trigger>
  75.                                                               </Style.Triggers>
  76.                                                           </Style>
  77.                                                       </Grid.Style>
  78.  
  79.                                                       <DockPanel HorizontalAlignment="Stretch">
  80.                                                           <Label Width="Auto" DockPanel.Dock="Left">
  81.                                                               <StackPanel Orientation="Horizontal">
  82.                                                                   <TextBlock Text="{lex:LocText Measure, Suffix=' ' }"></TextBlock>
  83.                                                                   <TextBlock Text="{Binding Number}"></TextBlock>
  84.                                                               </StackPanel>
  85.                                                           </Label>
  86.                                                       </DockPanel>
  87.                                                       <ProgressBar Value="{Binding Progress, Mode=OneWay}" Width="200" Grid.Column="1" HorizontalAlignment="Left" ></ProgressBar>
  88.                                                       <Label Content="{Binding Status, Mode=OneWay}" Margin="200,0,0,0"  Grid.Column="1" />
  89.  
  90.                                                   </Grid>
  91.                                              
  92.                                               </DataTemplate>
  93.                                           </ItemsControl.ItemTemplate>
  94.                                       </ItemsControl>
  95.                               </Expander>
  96.                           </DataTemplate>
  97.                       </ItemsControl.ItemTemplate>
  98.                      
  99.                   </ItemsControl>
  100.               </Expander>
  101.              
  102.           </DataTemplate>
  103.       </ItemsControl.ItemTemplate>
  104.   </ItemsControl>
Advertisement
Add Comment
Please, Sign In to add comment