chore(style): add ListView small style.
This commit is contained in:
1 parent
ad5de3a45e
commit
a484306f68
9 files changed
+161
-85
No files matched your search
@@ -15,27 +15,28 @@
|
|||||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}"/>
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}"/>
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="44" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListView">
|
<ControlTemplate TargetType="ListView">
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<Grid.RowDefinitions>
|
||||||
<ScrollViewer>
|
<RowDefinition Height="Auto" />
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<RowDefinition Height="*" />
|
||||||
<Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
<RowDefinition Height="*"/>
|
<hc:ToggleBlock Grid.Row="1" IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
</Grid.RowDefinitions>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
<ScrollViewer>
|
||||||
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
</Grid>
|
</ScrollViewer>
|
||||||
</ScrollViewer>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:Empty />
|
||||||
<hc:Empty />
|
</hc:ToggleBlock.UnCheckedContent>
|
||||||
</hc:ToggleBlock.UnCheckedContent>
|
</hc:ToggleBlock>
|
||||||
</hc:ToggleBlock>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -44,4 +45,15 @@
|
|||||||
|
|
||||||
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView"/>
|
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView"/>
|
||||||
|
|
||||||
|
<Style x:Key="ListViewItemBaseStyle.Small" BasedOn="{StaticResource ListViewItemBaseStyle}" TargetType="ListViewItem">
|
||||||
|
<Setter Property="Padding" Value="6,2" />
|
||||||
|
<Setter Property="MinHeight" Value="24" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,2" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListView.Small" BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView">
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle.Small}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="30" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -9503,8 +9503,8 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||||
<Setter Property="Padding" Value="12,6,12,12" />
|
<Setter Property="Padding" Value="12,0" />
|
||||||
<Setter Property="MinHeight" Value="44" />
|
<Setter Property="MinHeight" Value="{Binding Path=(hc:GridViewAttach.ColumnHeaderHeight),RelativeSource={RelativeSource AncestorType=ListView}}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="GridViewColumnHeader">
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
||||||
@@ -12938,33 +12938,43 @@
|
|||||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}" />
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="44" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListView">
|
<ControlTemplate TargetType="ListView">
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<Grid.RowDefinitions>
|
||||||
<ScrollViewer>
|
<RowDefinition Height="Auto" />
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<RowDefinition Height="*" />
|
||||||
<Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
<RowDefinition Height="*" />
|
<hc:ToggleBlock Grid.Row="1" IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
</Grid.RowDefinitions>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
<ScrollViewer>
|
||||||
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
</Grid>
|
</ScrollViewer>
|
||||||
</ScrollViewer>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:Empty />
|
||||||
<hc:Empty />
|
</hc:ToggleBlock.UnCheckedContent>
|
||||||
</hc:ToggleBlock.UnCheckedContent>
|
</hc:ToggleBlock>
|
||||||
</hc:ToggleBlock>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView" />
|
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView" />
|
||||||
|
<Style x:Key="ListViewItemBaseStyle.Small" BasedOn="{StaticResource ListViewItemBaseStyle}" TargetType="ListViewItem">
|
||||||
|
<Setter Property="Padding" Value="6,2" />
|
||||||
|
<Setter Property="MinHeight" Value="24" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,2" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ListView.Small" BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView">
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle.Small}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="30" />
|
||||||
|
</Style>
|
||||||
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine" />
|
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine" />
|
||||||
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine">
|
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<hc:TransitioningContentControl>
|
<hc:TransitioningContentControl>
|
||||||
<TabControl Style="{StaticResource TabControlInLine}">
|
<TabControl Style="{StaticResource TabControlInLine}">
|
||||||
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Common}}">
|
<TabItem Header="{ex:Lang Key={x:Static langs:LangKeys.Common}}">
|
||||||
<DataGrid hc:DataGridAttach.CanUnselectAllWithBlankArea="True" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
|
<DataGrid Style="{StaticResource DataGrid.Small}" hc:DataGridAttach.CanUnselectAllWithBlankArea="True" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
|
||||||
<DataGrid.RowHeaderTemplate>
|
<DataGrid.RowHeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
|
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
|
||||||
|
|||||||
@@ -6,14 +6,29 @@
|
|||||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||||
Background="{DynamicResource RegionBrush}">
|
Background="{DynamicResource RegionBrush}">
|
||||||
<hc:TransitioningContentControl>
|
<hc:TransitioningContentControl>
|
||||||
<ListView ItemsSource="{Binding DataList}">
|
<TabControl Style="{StaticResource TabControlInLine}">
|
||||||
<ListView.View>
|
<TabItem Header="Default">
|
||||||
<GridView>
|
<ListView ItemsSource="{Binding DataList}">
|
||||||
<GridViewColumn Width="80" Header="{ex:Lang Key={x:Static langs:LangKeys.Index}}" DisplayMemberBinding="{Binding Index}"/>
|
<ListView.View>
|
||||||
<GridViewColumn Width="100" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}" DisplayMemberBinding="{Binding Name}"/>
|
<GridView>
|
||||||
<GridViewColumn Width="200" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}" DisplayMemberBinding="{Binding Remark}"/>
|
<GridViewColumn Width="80" Header="{ex:Lang Key={x:Static langs:LangKeys.Index}}" DisplayMemberBinding="{Binding Index}" />
|
||||||
</GridView>
|
<GridViewColumn Width="100" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}" DisplayMemberBinding="{Binding Name}" />
|
||||||
</ListView.View>
|
<GridViewColumn Width="200" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}" DisplayMemberBinding="{Binding Remark}" />
|
||||||
</ListView>
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Small">
|
||||||
|
<ListView ItemsSource="{Binding DataList}" Style="{StaticResource ListView.Small}">
|
||||||
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridViewColumn Width="80" Header="{ex:Lang Key={x:Static langs:LangKeys.Index}}" DisplayMemberBinding="{Binding Index}" />
|
||||||
|
<GridViewColumn Width="100" Header="{ex:Lang Key={x:Static langs:LangKeys.Name}}" DisplayMemberBinding="{Binding Name}" />
|
||||||
|
<GridViewColumn Width="200" Header="{ex:Lang Key={x:Static langs:LangKeys.Remark}}" DisplayMemberBinding="{Binding Remark}" />
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using HandyControl.Data;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls;
|
||||||
|
|
||||||
|
public class GridViewAttach
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty ColumnHeaderHeightProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"ColumnHeaderHeight", typeof(double), typeof(GridViewAttach), new PropertyMetadata(ValueBoxes.Double0Box));
|
||||||
|
|
||||||
|
public static void SetColumnHeaderHeight(DependencyObject element, double value)
|
||||||
|
=> element.SetValue(ColumnHeaderHeightProperty, value);
|
||||||
|
|
||||||
|
public static double GetColumnHeaderHeight(DependencyObject element)
|
||||||
|
=> (double) element.GetValue(ColumnHeaderHeightProperty);
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\DropDownElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\DropDownElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\EdgeElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\EdgeElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\GridAttach.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\GridAttach.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\GridViewAttach.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconSwitchElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconSwitchElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\ImageAttach.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\ImageAttach.cs" />
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
<Setter Property="Padding" Value="12,6,12,12"/>
|
<Setter Property="Padding" Value="12,0" />
|
||||||
<Setter Property="MinHeight" Value="44"/>
|
<Setter Property="MinHeight" Value="{Binding Path=(hc:GridViewAttach.ColumnHeaderHeight),RelativeSource={RelativeSource AncestorType=ListView}}"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="GridViewColumnHeader">
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
||||||
|
|||||||
@@ -15,27 +15,28 @@
|
|||||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}"/>
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}"/>
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="44" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListView">
|
<ControlTemplate TargetType="ListView">
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<Grid.RowDefinitions>
|
||||||
<ScrollViewer>
|
<RowDefinition Height="Auto" />
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<RowDefinition Height="*" />
|
||||||
<Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
<RowDefinition Height="*"/>
|
<hc:ToggleBlock Grid.Row="1" IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
</Grid.RowDefinitions>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
<ScrollViewer>
|
||||||
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
</Grid>
|
</ScrollViewer>
|
||||||
</ScrollViewer>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:Empty />
|
||||||
<hc:Empty />
|
</hc:ToggleBlock.UnCheckedContent>
|
||||||
</hc:ToggleBlock.UnCheckedContent>
|
</hc:ToggleBlock>
|
||||||
</hc:ToggleBlock>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -51,6 +52,17 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView"/>
|
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView" />
|
||||||
|
|
||||||
|
<Style x:Key="ListViewItemBaseStyle.Small" BasedOn="{StaticResource ListViewItemBaseStyle}" TargetType="ListViewItem">
|
||||||
|
<Setter Property="Padding" Value="6,2" />
|
||||||
|
<Setter Property="MinHeight" Value="24" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,2" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListView.Small" BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView">
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle.Small}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="30" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -9620,8 +9620,8 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||||
<Setter Property="Padding" Value="12,6,12,12" />
|
<Setter Property="Padding" Value="12,0" />
|
||||||
<Setter Property="MinHeight" Value="44" />
|
<Setter Property="MinHeight" Value="{Binding Path=(hc:GridViewAttach.ColumnHeaderHeight),RelativeSource={RelativeSource AncestorType=ListView}}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="GridViewColumnHeader">
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
||||||
@@ -13079,27 +13079,28 @@
|
|||||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}" />
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="44" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListView">
|
<ControlTemplate TargetType="ListView">
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<Grid.RowDefinitions>
|
||||||
<ScrollViewer>
|
<RowDefinition Height="Auto" />
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<RowDefinition Height="*" />
|
||||||
<Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
<RowDefinition Height="*" />
|
<hc:ToggleBlock Grid.Row="1" IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
</Grid.RowDefinitions>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
<ScrollViewer>
|
||||||
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
</Grid>
|
</ScrollViewer>
|
||||||
</ScrollViewer>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:Empty />
|
||||||
<hc:Empty />
|
</hc:ToggleBlock.UnCheckedContent>
|
||||||
</hc:ToggleBlock.UnCheckedContent>
|
</hc:ToggleBlock>
|
||||||
</hc:ToggleBlock>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -13115,6 +13116,15 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView" />
|
<Style BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView" />
|
||||||
|
<Style x:Key="ListViewItemBaseStyle.Small" BasedOn="{StaticResource ListViewItemBaseStyle}" TargetType="ListViewItem">
|
||||||
|
<Setter Property="Padding" Value="6,2" />
|
||||||
|
<Setter Property="MinHeight" Value="24" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,2" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ListView.Small" BasedOn="{StaticResource ListViewBaseStyle}" TargetType="ListView">
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle.Small}" />
|
||||||
|
<Setter Property="hc:GridViewAttach.ColumnHeaderHeight" Value="30" />
|
||||||
|
</Style>
|
||||||
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine" />
|
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine" />
|
||||||
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine">
|
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="hc:LoadingLine">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
||||||
|
|||||||
Reference in new issue
Block a user