추천 TreeListView

레이어 목록
요즘의 그래픽 툴은 레이어의 그룹화를 할 수 있으므로 트리 뷰의 탑재는 당연하다.
보시다시피, 칼럼으로 분개된 항목도 필요하다.
그래, 원하는 것은 단순한 TreeView가 아닌, TreeListView이다.
그러나 그런 컨트롤러는 .NET에 표준 탑재되어 있지 않다. 만들 수밖에 없다

그래서 수많은 샘플을 검증하여 아마추어 나름으로 내린 결과를 이하에 정리한다.
dlaa
작년 찾아 그 때는 잘 갔던 코드.
해당 코드의대로는 계층이 한정적이지만,
다음을 마루 삭제하면 무한 계층화된다
xaml
<!-- Level 1 template leaves space for 1 child "Toggle" level -->
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubItems}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Task"/>
<ColumnDefinition/>
<ColumnDefinition SharedSizeGroup="Toggle"/>
<ColumnDefinition SharedSizeGroup="Duration"/>
<ColumnDefinition SharedSizeGroup="Notes"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Task}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="3" Text="{Binding Duration}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="4" Text="{Binding Notes}" Style="{StaticResource TextBlockStyle}"/>
</Grid>
<!-- Level 2 template has no children -->
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubItems}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Task"/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition SharedSizeGroup="Duration"/>
<ColumnDefinition SharedSizeGroup="Notes"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Task}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="3" Text="{Binding Duration}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="4" Text="{Binding Notes}" Style="{StaticResource TextBlockStyle}"/>
</Grid>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
그리고 이것이 응용 예

보시다시피 컬럼이 어긋나 있습니다 (삭제한 부분이 바로 그것이니까).
그리고 Tree의 Expander가 좌단 컬럼으로부터 깎을 수 없다.
모두, 컨버터와 Style의 조정으로 잘 된다고 생각한다(확실히 작년은 잘 갔다)가 이번은 배웅한다.
MarkFerdman
htps //w w. 그럼 r101. 코 m / 엔 / 아 rc c / 51761702. HTML
어떠한 질문 사이트인것 같지만, 이 페이지의 답변 부분이 좋다.
응용하고 정상적으로 호출합니다.
XAML <TreeView ItemsSource="{Binding}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}"/>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
그러자 이렇게 되었다.

보시다시피,
하이라이트가 관통하지 않고,
또한 폭을 조정하려고하면 컬럼이 파탄됩니다.
컬럼 헤더가 만들기 어렵다.
등의 문제가 있다.
끈적이면 어떻게 되겠지만 이번에는 배웅한다.
TreeListView
htps //w w. 여기에서 p 로지 ct. 코 m / 아 rc c ぇ s / 24973 / 트레 st ゔ ぃ え w-2
이것 굉장합니다.
어째서 이런 심플한 코드로 여기까지 할 수 있을까 신기할 정도로 스고이.
게다가 컬럼의 이동도 가능. 완벽하다...!

※토글버튼의 디자인은 개변하고 있습니다
이것으로 괘선이 있으면 말할 필요없이!
테두리 그리기
위 코드의 첫 번째 Border를 Grid로 바꾸고 ItemsControl을 병기한다.
generic.xaml <Grid x:Name="Border">
<!--GridViewRowPrsenter containing the current information.-->
<GridViewRowPresenter Content="{TemplateBinding Header}" Name="ayasiiPresenter"
Columns="{Binding Columns,
RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType=local:TreeListView}}"/>
<!-- ここから -->
<ItemsControl ItemsSource="{Binding ElementName=ayasiiPresenter,Path=Columns}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="0,0,0.5,0.5" Width="{Binding Path=ActualWidth}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- ここまで -->
</Grid>
결과는 여기

확실히 
기타
유료이지만 Nuget에 이런 것이 있다.

유료 컨트롤러 DataTreeGrid다.
htps // dlh 그 ft. 이 m / 히에라 r 치카 l이었다 ぃght ぃ b ら ry / たた t ええ g d. HTML
데모를 보는 한 꽤 좋을 것 같다.
기회가 있으면 검증하자.
Reference
이 문제에 관하여(추천 TreeListView), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ietora/items/3efb0946c1be0da1d2f3
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
<!-- Level 1 template leaves space for 1 child "Toggle" level -->
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubItems}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Task"/>
<ColumnDefinition/>
<ColumnDefinition SharedSizeGroup="Toggle"/>
<ColumnDefinition SharedSizeGroup="Duration"/>
<ColumnDefinition SharedSizeGroup="Notes"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Task}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="3" Text="{Binding Duration}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="4" Text="{Binding Notes}" Style="{StaticResource TextBlockStyle}"/>
</Grid>
<!-- Level 2 template has no children -->
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubItems}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Task"/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition SharedSizeGroup="Duration"/>
<ColumnDefinition SharedSizeGroup="Notes"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Task}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="3" Text="{Binding Duration}" Style="{StaticResource TextBlockStyle}"/>
<TextBlock Grid.Column="4" Text="{Binding Notes}" Style="{StaticResource TextBlockStyle}"/>
</Grid>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
htps //w w. 그럼 r101. 코 m / 엔 / 아 rc c / 51761702. HTML
어떠한 질문 사이트인것 같지만, 이 페이지의 답변 부분이 좋다.
응용하고 정상적으로 호출합니다.
XAML
<TreeView ItemsSource="{Binding}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}"/>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
그러자 이렇게 되었다.

보시다시피,
하이라이트가 관통하지 않고,
또한 폭을 조정하려고하면 컬럼이 파탄됩니다.
컬럼 헤더가 만들기 어렵다.
등의 문제가 있다.
끈적이면 어떻게 되겠지만 이번에는 배웅한다.
TreeListView
htps //w w. 여기에서 p 로지 ct. 코 m / 아 rc c ぇ s / 24973 / 트레 st ゔ ぃ え w-2
이것 굉장합니다.
어째서 이런 심플한 코드로 여기까지 할 수 있을까 신기할 정도로 스고이.
게다가 컬럼의 이동도 가능. 완벽하다...!

※토글버튼의 디자인은 개변하고 있습니다
이것으로 괘선이 있으면 말할 필요없이!
테두리 그리기
위 코드의 첫 번째 Border를 Grid로 바꾸고 ItemsControl을 병기한다.
generic.xaml <Grid x:Name="Border">
<!--GridViewRowPrsenter containing the current information.-->
<GridViewRowPresenter Content="{TemplateBinding Header}" Name="ayasiiPresenter"
Columns="{Binding Columns,
RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType=local:TreeListView}}"/>
<!-- ここから -->
<ItemsControl ItemsSource="{Binding ElementName=ayasiiPresenter,Path=Columns}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="0,0,0.5,0.5" Width="{Binding Path=ActualWidth}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- ここまで -->
</Grid>
결과는 여기

확실히 
기타
유료이지만 Nuget에 이런 것이 있다.

유료 컨트롤러 DataTreeGrid다.
htps // dlh 그 ft. 이 m / 히에라 r 치카 l이었다 ぃght ぃ b ら ry / たた t ええ g d. HTML
데모를 보는 한 꽤 좋을 것 같다.
기회가 있으면 검증하자.
Reference
이 문제에 관하여(추천 TreeListView), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ietora/items/3efb0946c1be0da1d2f3
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
위 코드의 첫 번째 Border를 Grid로 바꾸고 ItemsControl을 병기한다.
generic.xaml
<Grid x:Name="Border">
<!--GridViewRowPrsenter containing the current information.-->
<GridViewRowPresenter Content="{TemplateBinding Header}" Name="ayasiiPresenter"
Columns="{Binding Columns,
RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType=local:TreeListView}}"/>
<!-- ここから -->
<ItemsControl ItemsSource="{Binding ElementName=ayasiiPresenter,Path=Columns}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="0,0,0.5,0.5" Width="{Binding Path=ActualWidth}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- ここまで -->
</Grid>
결과는 여기

확실히

기타
유료이지만 Nuget에 이런 것이 있다.

유료 컨트롤러 DataTreeGrid다.
htps // dlh 그 ft. 이 m / 히에라 r 치카 l이었다 ぃght ぃ b ら ry / たた t ええ g d. HTML
데모를 보는 한 꽤 좋을 것 같다.
기회가 있으면 검증하자.
Reference
이 문제에 관하여(추천 TreeListView), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ietora/items/3efb0946c1be0da1d2f3
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(추천 TreeListView), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ietora/items/3efb0946c1be0da1d2f3텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)