This is a migrated thread and some comments may be shown as answers.

Row Details Styling

3 Answers 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Iron
Scott Michetti asked on 04 Apr 2014, 01:52 PM
Hello, I'm trying to style the Row Details, and I'm following the instructions on the help here: http://www.telerik.com/help/wpf/gridview-styling-row-details.html
I'm not seeing the properties shown in the help file. I should see ControlOuterBorder, ControlInnerBorder, etc.. according to the help. I'm using Blend for VS 2013 Do you have a video, or a sample project that does this? Any help will be greatly appreciated .
Thanks,
Scott

Here's the XAML I get.
<Style x:Key="RowDetailsStyleCustom" TargetType="{x:Type telerik:DetailsPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:DetailsPresenter}">
<Border x:Name="DetailsBorder" BorderBrush="#FF848484" BorderThickness="0,1">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="DetailsStates">
<VisualState x:Name="DetailsVisible">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DetailsBorder">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="DetailsCollapsed"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Visibility" Value="Collapsed"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFC2C2C2"/>
<GradientStop Color="#FFF0F0F0" Offset="0.3"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="White"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
</Window.Resources>



3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 07 Apr 2014, 07:05 AM
Hello Scott,


RadGridView does not expose style property, that you can use to set specific style for row details. 
This means, that you can set its style only through defining implicit style (style without x:Key attribute) targeted at DataCellsPresenter.  

I am attaching you small sample demo, which illustrates how to style this element of RadGridView. 


Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Trump
Top achievements
Rank 1
answered on 09 Mar 2018, 05:08 PM

Some properties are not accessible such as "ColorButtonStyle" and "ExpanderButtonStyle".

Dear Telerik, could you repost a sample with a new version. I use Version 2016.2.xxxx

0
Stefan
Telerik team
answered on 14 Mar 2018, 12:36 PM
Hi Trump,

Attached to my reply you can find a sample application demonstrating how the DetailsPresenter can be styled. Can you please take a look at it?

In case further assistance is needed, feel free to update me.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Scott Michetti
Top achievements
Rank 1
Iron
Answers by
Vanya Pavlova
Telerik team
Trump
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or