DataGrid
에 Expander
이 있지만, 두 항목 만 표시하고 확장을 클릭하면 나머지 항목이 표시됩니다.wpf DataGrid 확장 프로그램 표시 x 항목
어떻게 할 수 있습니까? 당신의 확장 헤더에
<DataGrid.GroupStyle>
<GroupStyle AlternationCount="7" >
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="False" Background="{Binding XPath=recipient_color}">
<Expander.Header>
<Label Content="{Binding}">
</Label>
</Expander.Header>
<Expander.Content>
<ItemsPresenter/>
</Expander.Content>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</DataGrid.GroupStyle>
구현 방법을 예제로 제공 할 수 있습니까? – keno
@keno 기본적으로 당신이해야 할 일은 내가 준 링크 (하단의 리소스 포함)에서 모든 xaml을 복사하고 DataGrid.Resources에 덤프하면됩니다. 그런 다음 ContentRow의 높이를 0에서 다른 높이로 변경하십시오. 문제는 현재 테마와 일치하지 않는 템플릿이며 정확한 시작 템플릿을 찾기가 어려울 수 있다는 것입니다. 그러나 그것의 가치가있는 시도. – Jelly
Hahahahaha IT !!!!! : D 실제로는 원래와 동일한 템플릿이 아닙니다 (머리글의 뒷 색은 파란색/자주색 등입니다). 하지만 그 mannualy 변경됩니다;) 감사합니다! – keno