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
1531
Setting Field ValueConstraint in code (not xaml)
posted

Hello,

Does anyone know how to set a value constraint in code (preferably C#)?  I want to set or change the max data length of a column in code when the form is loaded based on values in a table.  It was suggested on this form to use the construct show below in xaml.  That worked perfectly as a first step, but now I need to be able to do the same thing in code.

Any ideas?

Thanks,

Steve Wall

<igDP:FieldSettings.EditorStyle>

    <Style TargetType="igEditors:XamTextEditor">

        <Setter Property="ValueConstraint">

            <Setter.Value>

                <igEditors:ValueConstraint MaxLength="15"/>

            </Setter.Value>

        </Setter>

    </Style>

</igDP:FieldSettings.EditorStyle>