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
800
bind XamNumericEditor mask to const
posted

For the SomeField below, I have defined in my code a public const for the min (e.g. 45) and max (e.g. 34000).

Is there some way I can bind the Mask Value to those constants instead of having numbers hardcoded in the xaml (e.g. 45-34000)..

 

 <igDP:Field Name="SomeField" DataType="{x:Type sys:UInt16}"  Label="SomeField">
    <igDP:Field.Settings>
        <igDP:FieldSettings EditAsType="{x:Type sys:UInt16}">
            <igDP:FieldSettings.EditorStyle>
                <Style TargetType="{x:Type igEditors:XamNumericEditor}" >
                    <Setter Property="Mask" Value="{}{number:45-34000}" />
                </Style>
            </igDP:FieldSettings.EditorStyle>
        </igDP:FieldSettings>
    </igDP:Field.Settings>
</igDP:Field>

Parents
  • 138253
    Verified Answer
    Offline posted

    Hello,

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionalities you want. Basically I used Converter to return the appropriate Mask. Please let me know if this helps you or you need further assistance on this matter.

    Looking forward for your reply.

    XamNumericEditorMinMax.zip
Reply Children