Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- </DataGrid.Columns>
- <DataGrid.GroupStyle>
- <!--Default GroupStyle-->
- <GroupStyle>
- <GroupStyle.Panel>
- <ItemsPanelTemplate>
- <DataGridRowsPresenter/>
- </ItemsPanelTemplate>
- </GroupStyle.Panel>
- <GroupStyle.HeaderTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding Path=Name}" FontWeight="Bold" Padding="3"/>
- </StackPanel>
- </DataTemplate>
- </GroupStyle.HeaderTemplate>
- <GroupStyle.ContainerStyle>
- <Style TargetType="{x:Type GroupItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type GroupItem}">
- <Expander x:Name="exp"
- BorderBrush="#FFA4B97F"
- BorderThickness="0,0,0,1"
- IsExpanded="{Binding Path=Items[0].IsExpanded}">
- <Expander.Header>
- <DockPanel TextBlock.FontWeight="Bold">
- <TextBlock Text="{Binding Name}" Margin="5,0,5,0" Foreground="Blue" />
- <!--<TextBlock Text="{Binding Path=ItemCount}"/>-->
- <TextBlock Text=" (" />
- <TextBlock Text="{Binding Path=ItemCount}"/>
- <TextBlock Text=" Items )" />
- </DockPanel>
- </Expander.Header>
- <ItemsPresenter/>
- </Expander>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </GroupStyle.ContainerStyle>
- </GroupStyle>
- </DataGrid.GroupStyle>
- </DataGrid>![enter image description here][1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement