Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. </DataGrid.Columns>
  2. <DataGrid.GroupStyle>
  3. <!--Default GroupStyle-->
  4. <GroupStyle>
  5. <GroupStyle.Panel>
  6. <ItemsPanelTemplate>
  7. <DataGridRowsPresenter/>
  8. </ItemsPanelTemplate>
  9. </GroupStyle.Panel>
  10. <GroupStyle.HeaderTemplate>
  11. <DataTemplate>
  12. <StackPanel>
  13. <TextBlock Text="{Binding Path=Name}" FontWeight="Bold" Padding="3"/>
  14. </StackPanel>
  15. </DataTemplate>
  16. </GroupStyle.HeaderTemplate>
  17. <GroupStyle.ContainerStyle>
  18. <Style TargetType="{x:Type GroupItem}">
  19. <Setter Property="Template">
  20. <Setter.Value>
  21. <ControlTemplate TargetType="{x:Type GroupItem}">
  22. <Expander x:Name="exp"
  23. BorderBrush="#FFA4B97F"
  24. BorderThickness="0,0,0,1"
  25. IsExpanded="{Binding Path=Items[0].IsExpanded}">
  26. <Expander.Header>
  27. <DockPanel TextBlock.FontWeight="Bold">
  28. <TextBlock Text="{Binding Name}" Margin="5,0,5,0" Foreground="Blue" />
  29. <!--<TextBlock Text="{Binding Path=ItemCount}"/>-->
  30. <TextBlock Text=" (" />
  31. <TextBlock Text="{Binding Path=ItemCount}"/>
  32. <TextBlock Text=" Items )" />
  33.  
  34. </DockPanel>
  35. </Expander.Header>
  36. <ItemsPresenter/>
  37. </Expander>
  38. </ControlTemplate>
  39. </Setter.Value>
  40. </Setter>
  41. </Style>
  42. </GroupStyle.ContainerStyle>
  43. </GroupStyle>
  44. </DataGrid.GroupStyle>
  45. </DataGrid>![enter image description here][1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement