Telerik NumericUpDown控件无法正确显示整数的空值

Cor*_*ian 4 wpf telerik numericupdown

我们在应用程序中使用Telerik RadNumericUpDown控件(2013版)来显示和编辑double值和整数; 该控件适用于可以为空的double类型:它不显示空值,0.00显示0值.我们希望整数具有相同的行为,但控件始终显示0表示空值.我已经尝试将NullValue设置为空字符串&null,基于此处的讨论:http://www.telerik.com/community/forums/silverlight/numericupdown/null.aspx,但这不能解决我们的问题.

XAML:

      <telerik:RadNumericUpDown Value="{Binding Path=Contents, Mode=TwoWay}"
                        NumberDecimalDigits="0"
                        IsEnabled="True"
                        IsEditable="True"
                        IsInteger="True"
                        NullValue=""                                
                        MinWidth="70"
                        HorizontalAlignment="Left"
                        HorizontalContentAlignment="Left" />
Run Code Online (Sandbox Code Playgroud)

Contents属性是一个可以为null的int.

任何帮助表示赞赏.

小智 8

尝试添加到绑定TargetNullValue ='',为我工作

    <telerik:RadNumericUpDown Value="{Binding Path=Contents, Mode=TwoWay, TargetNullValue=''}" 
                    IsEnabled="True"
                    IsEditable="True"
                    IsInteger="True"
                    NullValue=""                                
                    MinWidth="70"
                    HorizontalAlignment="Left"
                    HorizontalContentAlignment="Left" />
Run Code Online (Sandbox Code Playgroud)