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
430
XamGrid: DataContext of an unbound column
posted

Hello,

I'm having a little issue with unbound columns. When defining a DataTemplate for the cell in an unbound column, the ContentPresenter for some unknown reason has the DataContext property set to some TextBlock.

All the other components of the cell style has the expected UnboundColumnDataContext.

The markup is as follows:

<Style TargetType="{x:Type ig:CellControl}" x:Key="ActionsColumnStyle">
    <Setter Property="ContentTemplate">
        <Setter.Value>
            <DataTemplate>
<TextBlock Text="Test" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>