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

[Solved] Styling the Details Presenter

8 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Abhishek Gairola
Top achievements
Rank 1
Abhishek Gairola asked on 19 Aug 2010, 03:51 PM
How can I change the style of a details presenter?
I want background to be white
and fond to be black

Thank you!

8 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 Aug 2010, 03:52 PM
Hello Abhishek Gairola,

Have you tried using the RowDetailsStyle property?

Regards,
Ross
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
Abhishek Gairola
Top achievements
Rank 1
answered on 19 Aug 2010, 03:56 PM
Can you please give me a smaple

Something like
<ResourceDictionary
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    >
  
      
    <Style x:Key="RowDetails" TargetType="telerikGrid:RowDetails">
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="Black" />
    </Style>
      
</ResourceDictionary>


But I am not sure if it will work
0
Rossen Hristov
Telerik team
answered on 19 Aug 2010, 04:02 PM
Hi Abhishek Gairola,

Please, take a look at this.

Best wishes,
Ross
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
Abhishek Gairola
Top achievements
Rank 1
answered on 19 Aug 2010, 04:06 PM
Yeah I saw this but currently I do not have Blend on my machine
only VS2008 :(
0
Accepted
Rossen Hristov
Telerik team
answered on 19 Aug 2010, 04:10 PM
Hi Abhishek Gairola,

Simply write this:

<Style x:Key="RowDetailsStyle" TargetType="telerik:DetailsPresenter">
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="Black" />
</Style>

and then in the grid set the RowDetailsStyle={StaticResource RowDetailsStyle}

That's it.

I hope this helps.

Best wishes,
Ross
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
Abhishek Gairola
Top achievements
Rank 1
answered on 19 Aug 2010, 04:15 PM
Thank you very much Ross
I will try this
0
Abhishek Gairola
Top achievements
Rank 1
answered on 19 Aug 2010, 04:58 PM
Just one more question
what is the namespace for telerik in your code?

xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"

gives me an error that DetailsPresenter was not found

Thank you!
0
Vlad
Telerik team
answered on 20 Aug 2010, 06:32 AM
Hello,

 You can use our Uri namespace: 

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

All the best,
Vlad
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
Tags
GridView
Asked by
Abhishek Gairola
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Abhishek Gairola
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or