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
1700
Replace UnboundField by a Field
posted

Hello,

I have one UnboundField that cover all columns of my xamDataGrid.

I have build server that report errors and warnings. And some warnings come from this old field.

I try to replace it like :

<dataPresenter:Field x:Name="Header"
AllowEdit="False"
AllowFixing="No"
Column="2"
Label="Azimuth"
Row="0">
<dataPresenter:Field.Settings>
<dataPresenter:FieldSettings CellContentAlignment="LabelOnly" LabelTextAlignment="Center" />
</dataPresenter:Field.Settings>
</dataPresenter:Field>

<dataPresenter:Field Name="Header2"
AllowEdit="False"
AllowFixing="No"
Column="2"
Row="0">
<dataPresenter:Field.Settings>
<dataPresenter:FieldSettings AllowRecordFiltering="False">
<dataPresenter:FieldSettings.LabelPresenterStyle>
<Style BasedOn="{StaticResource LabelPresenterStyle}" TargetType="{x:Type dataPresenter:LabelPresenter}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock Text="Text" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</dataPresenter:FieldSettings.LabelPresenterStyle>
</dataPresenter:FieldSettings>
</dataPresenter:Field.Settings>
</dataPresenter:Field>

I want to display "Text" wihout any values link to this string.

Could you help me ?

Regards