Hi,
I have set the GridLinesVisibility-Property to "None" in my grid. But when the rowdetails are visible (set to "Visible" or "VisibleWhenSelected"), there are 3 horizontal lines visible:
above the row,
between the row and rowdetails,
under the rowdetails.
How can I remove (and recolor) these??? Espacially the one between the row and the rowdetails...
(I've searched in the GridViewStyle, RowStyle, CellStyle an the RowDetailsStyle for this, but couldn't find anything that effected.)
Thanks & Regards...
Filiz
I have set the GridLinesVisibility-Property to "None" in my grid. But when the rowdetails are visible (set to "Visible" or "VisibleWhenSelected"), there are 3 horizontal lines visible:
above the row,
between the row and rowdetails,
under the rowdetails.
How can I remove (and recolor) these??? Espacially the one between the row and the rowdetails...
(I've searched in the GridViewStyle, RowStyle, CellStyle an the RowDetailsStyle for this, but couldn't find anything that effected.)
Thanks & Regards...
Filiz
4 Answers, 1 is accepted
0
Hello Filiz,
You can find the default style/template for the DetailsPresenter and all of the brushes in the themes folder that is installed with the product:
\Program Files (x86)\Telerik\RadControls for WPF Q1 2011\Themes\ExpressionDark\Themes\Expression\Dark\DetailsPresenter.xaml
Attached is a sample project with a custom style defined for the DetailsPresenter without any borders in the template.
Let me know if you have any questions with this matter.
Greetings,
Vladimir Zagorski
the Telerik team
You can find the default style/template for the DetailsPresenter and all of the brushes in the themes folder that is installed with the product:
\Program Files (x86)\Telerik\RadControls for WPF Q1 2011\Themes\ExpressionDark\Themes\Expression\Dark\DetailsPresenter.xaml
Attached is a sample project with a custom style defined for the DetailsPresenter without any borders in the template.
Let me know if you have any questions with this matter.
Greetings,
Vladimir Zagorski
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Filiz
Top achievements
Rank 1
answered on 18 Apr 2011, 08:39 AM
Hi,
thanks for your quick reply. I've put your sample code in my RowDetailsStyle and the horizontal lines disappeared. But now the backgroundcolor I set has no effect. Here's my code:
<Style x:Key="RowDetailsStyle_ReceiptReversal" TargetType="{x:Type telerik:DetailsPresenter}">
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:DetailsPresenter}">
<ContentPresenter x:Name="PART_ContentPresenter" Margin="{TemplateBinding Padding}" VerticalAlignment=" {TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Visibility" Value="Collapsed" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFE7F3FF" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
The backgroundcolor stays white (or transparent?)...
I also tried to set two of the horizontal lines visible (the one above the row and the one under the rowdetails), but it didn't work :(
thanks for your quick reply. I've put your sample code in my RowDetailsStyle and the horizontal lines disappeared. But now the backgroundcolor I set has no effect. Here's my code:
<Style x:Key="RowDetailsStyle_ReceiptReversal" TargetType="{x:Type telerik:DetailsPresenter}">
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:DetailsPresenter}">
<ContentPresenter x:Name="PART_ContentPresenter" Margin="{TemplateBinding Padding}" VerticalAlignment=" {TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Visibility" Value="Collapsed" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFE7F3FF" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
The backgroundcolor stays white (or transparent?)...
I also tried to set two of the horizontal lines visible (the one above the row and the one under the rowdetails), but it didn't work :(
0
Hello Filiz,
You can just add a border in the control template and set the background and the border thickness as follows:
Note that I've put the default style for the DetailsPresenter into the window's resources so you can uncomment and use it as a starting point when modifying the style in Blend or in Visual Studio.
Vladimir Zagorski
the Telerik team
You can just add a border in the control template and set the background and the border thickness as follows:
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:DetailsPresenter"
>
<
Border
Background
=
"{TemplateBinding Background}"
BorderBrush
=
"Blue"
BorderThickness
=
"0,1,0,1"
>
<
ContentPresenter
x:Name
=
"PART_ContentPresenter"
Margin
=
"{TemplateBinding Padding}"
VerticalAlignment
=
"{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
/>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
Note that I've put the default style for the DetailsPresenter into the window's resources so you can uncomment and use it as a starting point when modifying the style in Blend or in Visual Studio.
Vladimir Zagorski
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Filiz
Top achievements
Rank 1
answered on 18 Apr 2011, 11:57 AM
Thanks! It worked fine :)