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
695
Customising the LabelPresenter
posted

I'm using the XAML below to change the LabelPresenter which works fine apart that the label is just showing the style type rather than applying the new style I am passing via the valueConverter. is this the right aproach?

<Setter Property="Template">

<Setter.Value>

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

<ContentControl>

<ContentControl.Content>

<Binding Path="Name" RelativeSource="{RelativeSource TemplatedParent}"

Converter="{StaticResource cvpLabelValueConverter}"/>

</ContentControl.Content>

</ContentControl>

</ControlTemplate>

</Setter.Value>

</Setter>

Parents
  • 4850
    Offline posted

    You would have to change toPath="Field.Name" since the LabelPresenter exposes a Field property not a Name property. However, if all you want to do is change the value of the label then you can specifiy that off the Field's Label property either in xaml or by wiring up the FieldLayoutInitialized event.

Reply Children
No Data