Skip to content

Commit

Permalink
fix(hierarchical-store-view): add scroll-view to treeview of control
Browse files Browse the repository at this point in the history
  • Loading branch information
asv-soft-u03 committed Jun 24, 2024
1 parent 37bcc1a commit 6825990
Showing 1 changed file with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,26 @@
Text="{Binding SearchText}" />
</Border>
</DockPanel>
<TreeView SelectionMode="Toggle" Margin="0,8,0,8" ItemsSource="{Binding Items}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<TreeView.ItemTemplate>
<TreeDataTemplate ItemsSource="{Binding Items}">
<DockPanel HorizontalAlignment="Stretch" LastChildFill="False">
<avalonia:MaterialIcon
Margin="0,0,8,0"
Classes.folder="{Binding IsFolder}"
Classes.file="{Binding IsFile}"
Classes.expanded="{Binding IsExpanded}"
Classes.selected="{Binding IsSelected}"
Width="15" Height="15" />
<TextBlock MinWidth="120" Text="{Binding Name}" />
<TextBlock DockPanel.Dock="Right" Foreground="Gray" Text="{Binding Description}" />
</DockPanel>
</TreeDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<ScrollViewer MaxHeight="370" VerticalAlignment="Top">
<TreeView SelectionMode="Toggle" Margin="0,8,0,8" ItemsSource="{Binding Items}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<TreeView.ItemTemplate>
<TreeDataTemplate ItemsSource="{Binding Items}">
<DockPanel HorizontalAlignment="Stretch" LastChildFill="False">
<avalonia:MaterialIcon
Margin="0,0,8,0"
Classes.folder="{Binding IsFolder}"
Classes.file="{Binding IsFile}"
Classes.expanded="{Binding IsExpanded}"
Classes.selected="{Binding IsSelected}"
Width="15" Height="15" />
<TextBlock MinWidth="120" Text="{Binding Name}" />
<TextBlock DockPanel.Dock="Right" Foreground="Gray" Text="{Binding Description}" />
</DockPanel>
</TreeDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</ScrollViewer>
</DockPanel>
</Border>

Expand Down

0 comments on commit 6825990

Please sign in to comment.