I'm using DoubleUpDown object in xaml with this code
Why? Any idea?
Thanks
<xctk:DoubleUpDown FormatString="F2" Value="{Binding PosValueConst, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" cal:Message.Attach=" [Event MouseEnter] = [Action Handler_MouseEnter($this,$eventArgs)];[Event MouseLeave] = [Action Handler_MouseLeave($this,$eventArgs)];[Event TextChanged] = [Action MarkUnsaveFile()]" Increment="0.01" Minimum="0" ParsingNumberStyle="Number" >
<xctk:DoubleUpDown.Style>
<Style TargetType="{x:Type xctk:DoubleUpDown}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=EnableSubMenuPosConst}" Value="false">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=EnableSubMenuPosConst}" Value="true">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self},Path=(Validation.Errors)[0].ErrorContent}"/>
</Trigger>
</Style.Triggers>
</Style>
</xctk:DoubleUpDown.Style>
</xctk:DoubleUpDown>
But i got System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='1' BindingExpression:Path=PosValueConst; DataItem='MoveAbsViewModel' (HashCode=29056806); target element is 'DoubleUpDown' (Name='PosValueConst'); target property is 'Visibility' (type 'Visibility')Why? Any idea?
Thanks