更新
This commit is contained in:
46
WPFDark/Controls/BiaTreeListView.xaml
Normal file
46
WPFDark/Controls/BiaTreeListView.xaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFDark.Controls"
|
||||
xmlns:wpf="clr-namespace:WPFDark">
|
||||
<Style TargetType="{x:Type controls:BiaTreeListView}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:BiaTreeListView}">
|
||||
<controls:BiaClippingBorder Background="{DynamicResource TextBoxBorderBrushKey}"
|
||||
BorderBrush="{DynamicResource TextBoxBorderBrushKey}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=CornerRadius, Mode=OneWay}">
|
||||
<DockPanel>
|
||||
<ScrollViewer x:Name="HeaderScrollViewer"
|
||||
DockPanel.Dock="Top"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Disabled">
|
||||
<GridViewHeaderRowPresenter HorizontalAlignment="Left" Columns="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=Columns, Mode=OneWay}" />
|
||||
</ScrollViewer>
|
||||
|
||||
<controls:BiaTreeView HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
AlternationCount="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=AlternationCount, Mode=OneWay}"
|
||||
BorderThickness="0"
|
||||
CornerRadius="0"
|
||||
IndentSize="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=IndentSize, Mode=OneWay}"
|
||||
IsSelectionEnabled="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=IsSelectionEnabled, Mode=OneWay}"
|
||||
IsVisibleItemExpanderButton="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=IsVisibleItemExpanderButton, Mode=OneWay}"
|
||||
ItemContainerStyle="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=ItemContainerStyle, Mode=OneWay}"
|
||||
ItemTemplate="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=ItemTemplate, Mode=OneWay}"
|
||||
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=ItemsSource, Mode=OneWay}"
|
||||
SelectedItem="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=SelectedItem, Mode=OneWay}"
|
||||
SelectedItems="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:BiaTreeListView}}, Path=SelectedItems, Mode=OneWay}">
|
||||
<TreeView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel IsItemsHost="True" />
|
||||
</ItemsPanelTemplate>
|
||||
</TreeView.ItemsPanel>
|
||||
</controls:BiaTreeView>
|
||||
</DockPanel>
|
||||
</controls:BiaClippingBorder>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user