Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Gripper for MetroDataGridRowHeader #1822

Merged
merged 1 commit into from
Feb 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions MahApps.Metro/Styles/Controls.DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,21 @@

<Style x:Key="MetroRowHeaderGripperStyle"
TargetType="{x:Type Thumb}">
<Setter Property="Width"
Value="8" />
<Setter Property="Height"
Value="6" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should be

        <Setter Property="Width"
                Value="8" />
        <Setter Property="Height"
                Value="6" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think so
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, you're right, my mistake

<Setter Property="Background"
Value="Transparent" />
Value="{DynamicResource GrayBrush5}" />
<Setter Property="Cursor"
Value="SizeNS" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True" />
<Border Padding="{TemplateBinding Padding}"
Background="Transparent">
<Rectangle VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Height="1"
Fill="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
Expand Down Expand Up @@ -241,7 +244,7 @@
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock TextBlock.FontWeight="SemiBold"
<TextBlock FontWeight="SemiBold"
Text="{Binding Converter={StaticResource ToUpperConverter}}" />
</DataTemplate>
</Setter.Value>
Expand Down Expand Up @@ -277,12 +280,13 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</Border>
<Thumb x:Name="PART_TopHeaderGripper"
VerticalContentAlignment="Top"
VerticalAlignment="Top"
Height="3"
Background="Transparent"
Style="{StaticResource MetroRowHeaderGripperStyle}" />
<Thumb x:Name="PART_BottomHeaderGripper"
VerticalContentAlignment="Bottom"
VerticalAlignment="Bottom"
Height="3"
Style="{StaticResource MetroRowHeaderGripperStyle}" />
</Grid>

Expand Down