-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
240 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/Shared/HandyControl_Shared/Themes/Styles/Base/ListViewBaseStyle.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:hc="clr-namespace:HandyControl.Controls"> | ||
|
||
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb"> | ||
<Setter Property="Canvas.Right" Value="-9"/> | ||
<Setter Property="Width" Value="18"/> | ||
<Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/> | ||
<Setter Property="Padding" Value="0"/> | ||
<Setter Property="Background" Value="Transparent"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="Thumb"> | ||
<Border Background="Transparent" Padding="{TemplateBinding Padding}"> | ||
<Rectangle Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Width="1"/> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<Style TargetType="GridViewColumnHeader"> | ||
<Setter Property="VerticalContentAlignment" Value="Center"/> | ||
<Setter Property="HorizontalContentAlignment" Value="Left"/> | ||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/> | ||
<Setter Property="Padding" Value="12,6,12,12"/> | ||
<Setter Property="MinHeight" Value="44"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="GridViewColumnHeader"> | ||
<hc:SimplePanel SnapsToDevicePixels="true"> | ||
<Border x:Name="HeaderBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent"> | ||
<ContentPresenter x:Name="HeaderContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> | ||
</Border> | ||
<Canvas> | ||
<Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}"/> | ||
</Canvas> | ||
</hc:SimplePanel> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<Style x:Key="ListViewItemBaseStyle" TargetType="ListViewItem"> | ||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/> | ||
<Setter Property="BorderThickness" Value="0"/> | ||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/> | ||
<Setter Property="SnapsToDevicePixels" Value="true"/> | ||
<Setter Property="Margin" Value="0,0,0,4"/> | ||
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/> | ||
<Setter Property="MinHeight" Value="44"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="ListViewItem"> | ||
<Border CornerRadius="4" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> | ||
<GridViewRowPresenter Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}"/> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
<Style.Triggers> | ||
<Trigger Property="IsMouseOver" Value="true"> | ||
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/> | ||
</Trigger> | ||
<Trigger Property="IsSelected" Value="True"> | ||
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/> | ||
<Setter Property="TextElement.Foreground" Value="{DynamicResource TextIconBrush}"/> | ||
</Trigger> | ||
<MultiTrigger> | ||
<MultiTrigger.Conditions> | ||
<Condition Property="IsSelected" Value="true"/> | ||
<Condition Property="Selector.IsSelectionActive" Value="false"/> | ||
</MultiTrigger.Conditions> | ||
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/> | ||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/> | ||
</MultiTrigger> | ||
</Style.Triggers> | ||
</Style> | ||
|
||
|
||
</ResourceDictionary> |
Oops, something went wrong.