This project has moved. For the latest updates, please go here.

SingleUpDown [FIX Included]

Jan 24, 2013 at 4:27 PM
Edited Jan 24, 2013 at 4:41 PM

Currently the SingleUpDown used in the PropertyGrid disables it's spinner controls like in read-only mode, the DoubleUpDown doesn't.

So float properties can't be edited, while double properties can be edited.

I've been digging through the source and the only difference i find is that the null check for the spinner doesn't exist in the SingleUpDown

    protected override void SetValidSpinDirection()
      if( Value.HasValue && float.IsInfinity( Value.Value ) && (Spinner != null))
        Spinner.ValidSpinDirection = ValidSpinDirections.None;

 But this doesn't help fix the problem :s 

Edit1: Modified the samples and added a single and doubleupdown in the stackpanel, double works, single has same misbehavior as inside the propertygrid, so inspection of that control might be required.

       <xctk:DoubleUpDown />
       <xctk:SingleUpDown />


      UpdateMetadata( typeof( SingleUpDown ), 1f, float.PositiveInfinity, float.NegativeInfinity );

type, default, minvalue, maxvalue? shouldn't positive and negative infinity be switched around then? 

Problem fixed, someone migth want to push this fix into the source code 

Jan 24, 2013 at 8:42 PM

issue has been created.