Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1070
UseNestedPanels results in a border in Generic Theme
posted

I turned UseNestedPanels on in the XamDataGrid because I need some of the nested tables to have margins and possibly a border. When I turned it on, all of a sudden all of the nested rows have a gray border which I can't seem to turn off. I tried to the following, with no luck:

 

                <Style TargetType="{x:Type igDP:ExpandableFieldRecordPresenter}">

                    <Setter Property="Margin" Value="0,0,0,0"/>

                    <Setter Property="Padding" Value="0,0,0,0"/>

                    <Setter Property="BorderThickness" Value="0"/>

                </Style>

p>Is this because I'm using the Generic theme? How would I turn this off?

 

  • 69686
    posted

    Hello,

    Yes, this is because of the theme. I took a look at the template of the Generic theme and it looks like that for this border, the BorderThickness is not Template bound to the BorderThickness property of the ExpandableFieldRecordPresenter and is set to 1. However, its BorderBrush is set to NestedContentBackgroundBorder brush.

    If you want to remove this border, you can either override this brush : and set it to transparent

            xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"

     

                    <SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, NestedContentBackgroundBorder}" Color="Transparent" PresentationOptions:Freeze="true" />

    or modify the control template of the ExpandableFIeldRecordPresenter and set the borderthickness to 0. The default styles you can find in the DefaultStyles directory in the Infragistics folder.