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

Style in ResourceDictionary being ignored

2 Answers 176 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Karen
Top achievements
Rank 1
Karen asked on 07 May 2014, 02:43 PM
I am trying to remove the mouseover row highlight on a RadGridView. I've followed the instructions here, but I put the style in a resource dictionary. Here is the App.xaml:

<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Styles/GridViewRowStyle.xaml"/>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

And the RadGridView xaml:

<telerik:RadGridView x:Name="statusGrid" AutoGenerateColumns="False" CanUserDeleteRows="False"
         CanUserInsertRows="False" ItemsSource="{Binding Status}"
         IsReadOnly="True" RowStyle="{DynamicResource GridViewRowStyle}">

This style is completely ignored if it is in an external file. If I do the same procedure as in the stated in the documentation but put it in the MainWindow.xaml file, it works correctly. Why is this?

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 08 May 2014, 02:38 PM
Hello,

I tested the described behavior and I am afraid I could not reproduce any issue.

You can check the attached demo solution as a reference.

Let me know how it works for you.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Karen
Top achievements
Rank 1
answered on 15 May 2014, 07:33 PM
Hello,

I figured out it was because I am not using the App.xaml for anything other than the designer. I had to add the resources manually. Thanks anyhow.
Tags
GridView
Asked by
Karen
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Karen
Top achievements
Rank 1
Share this question
or