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
210
XamNumericEditor - Value could not be converted
posted

Hi,

I am using a XamNumericEditor and have a number of issues.

Firstly, when a value is entered into the editor a validation error occurs and says "Value 'x' could not be converted".

Secondly, the control displays values as double and allows doubles to be entered even though I have explicityly set ValueType="System:Int32".

Am I missing something?

The XamNumericEditor is defined as follows:

        <igWPF:XamNumericEditor Grid.Row="1" Grid.Column="1" Style="{StaticResource xamNumericEditorDefaultStyle}"
                                ValueType="System:Int32">
            <igWPF:XamNumericEditor.Value>
                <Binding Path="Share.NumShares"
                         Mode="TwoWay"
                         UpdateSourceTrigger="PropertyChanged">
                </Binding>
            </igWPF:XamNumericEditor.Value>
        </igWPF:XamNumericEditor>
The Share.NumShares property accessible through the ViewModel which is the DataContext of the window this control sits on is defined as follows:
        public int NumShares { get; set; }