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
40
Retemplating the DataRecordPresenter.
posted

I want to create a new template for a datarecord presenter, but I'm having trouble getting anything to show up.  I see my border, but none of the data is inside it.  This is a really simple style for reference.

 

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

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

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="{x:Type igDP:DataRecordPresenter}">

<Border BorderBrush="Blue" BorderThickness="2" Background="LightBlue" CornerRadius="10,0,10,0">

<StackPanel>

<ContentPresenter Name="PART_HeaderContentSite" MinHeight="20" MinWidth="50"/>

<ContentPresenter Name="PART_RecordContentSite" MinHeight="20" MinWidth="50"/>

<ContentPresenter Name="PART_NestedContentSite" MinHeight="20" MinWidth="50"/>

</StackPanel>

</Border>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>