Hi,
I am trying to change DisplayText of XamNumericEditor on a certain condition. But, DataTrigger never fires. In below mentioned code, background color is changing. But, converter set on ValueToDisplayTextConverter is not getting called. Having said that, converter gets called when I exit from edit mode. I want the datatrigger to fire when value is displayed for the first time.
Have attached complete sample for your reference.
<igDP:UnboundField BindingPath="Price" BindingMode="TwoWay" Label="Ps Px" Name="PosInsidePx">
<igDP:Field.Settings>
<igDP:FieldSettings EditAsType="{x:Type System:Double}" >
<igDP:FieldSettings.EditorStyle>
<Style TargetType="igED:XamNumericEditor">
<Setter Property="Format" Value="###,##0.0" />
<Setter Property="Mask" Value="{}{double:-9.3}" />
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<!--<Setter Property="ValueToDisplayTextConverter" Value="{StaticResource DecimalToTicksConverter}"/>-->
<Style.Triggers>
<DataTrigger Binding="{Binding DataItem.IsMuniType}" Value="False">
<Setter Property="Background" Value="Aqua"/>
<Setter Property="ValueToDisplayTextConverter" Value="{StaticResource DecimalToTicksConverter}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:UnboundField>
Thanks,
Durga
Can some one please help me with this issue ?.
Why you don't using MultiValueConverter to achieve it?
e.g:
<igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="Text"> <Setter.Value> <MultiBinding Converter="{StaticResource XXXXConverter}"> <Binding Path="DataItem.IsMuniType"/> <Binding Path="DataItem.Price"/> </MultiBinding> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.EditorStyle>