Click here to Skip to main content
15,395,360 members
Please Sign up or sign in to vote.
5.00/5 (4 votes)
See more:
Afternoon all,

We have a WPF User Control that hosts an Infragistics DataGrid. For the record slector in that grid we have locally defined style that adds a check box (below). This works fine in one application, but in a second application the Checkbox exists but appears to either be very small or not visible.

I believe that this is somehow inheriting or using a different style, can anybody tell me how I can discover what syle is in use at runtime?

<pre lang="xml"><igDataPresenter:XamDataGrid.Resources>
    <!--  This Style puts a CheckBox into the record selectors.  -->
    <Style BasedOn="{x:Null}" TargetType="{x:Type igDataPresenter:RecordSelector}">
        <Setter Property="Template">
                <ControlTemplate TargetType="{x:Type igDataPresenter:RecordSelector}">
                    <CheckBox HorizontalAlignment="Center"
                              IsChecked="{Binding Path=DataItem.IsChecked, Mode=TwoWay}" />

Thanks guys and girls
johannesnestler 28-Jan-11 9:07am
very good question!
If I access the style property I can just tell it's not the style I wanted if the Setters doesn't match. I can't find any property on the Style class to identify it...
Pravin Patil, Mumbai 28-Jan-11 10:25am
Very good question.

1 solution

I like using WPF Snoop[^] to look at WPF settings and styles in runtime.
Nisarg S Shah 28-Aug-12 4:19am
I like using WPF Inspector.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900