wpfinfragisticsxamdatagrid

xamDataGrid - indenting nested levels


I have a xamDataGrid with two levels of data. (see other question on SO).

There is very little visually that shows where one level of data starts and a seconds begins. Take a look at this snippet from the xamFeatureBrowser:

enter image description here

What I want, is to indent the second level a little. RecordPresenter has a NestedContentMargin property, but it's read-only...

An alternative, would be to display some kind of thin footer for each second level grid.


Solution

  • This one turned out to be easier then expected. I'm sure I tried this before I asked the question, but for some reason, I failed. When I showed the problem to a colleague, he made it work just like that. :-/

    So here is the style:

    <Style TargetType="{x:Type igDP:DataRecordPresenter}" x:Key="NestedRecordStyle">
      <Setter Property="Margin"  Value="20,0,0,0"/>
    </Style> 
    

    and here's how I applied it to my nested fieldset:

    <igDP:FieldLayout ParentFieldLayoutKey="MainLayout">
      <igDP:FieldLayout.Settings>
        <igDP:FieldLayoutSettings DataRecordPresenterStyle="{StaticResource NestedRecordStyle}"/>
      </igDP:FieldLayout.Settings>
      ...
    </igDP:FieldLayout>
    

    Just like that...

    edit: Updated typo