7 changed files with 63 additions and 9 deletions
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace Microsoft.Windows.Controls.PropertyGrid.Editors |
|||
{ |
|||
public class IntegerUpDownEditor : NumericUpDownEditor |
|||
{ |
|||
protected override void SetEditorProperties() |
|||
{ |
|||
NumericUpDown nud = (NumericUpDown)Editor; |
|||
nud.ValueType = typeof(int); |
|||
nud.FormatString = "F0"; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using System; |
|||
|
|||
namespace Microsoft.Windows.Controls.PropertyGrid.Editors |
|||
{ |
|||
public class NumericUpDownEditor : TypeEditor |
|||
{ |
|||
protected override void Initialize() |
|||
{ |
|||
Editor = new NumericUpDown(); |
|||
ValueProperty = NumericUpDown.ValueProperty; |
|||
SetEditorProperties(); |
|||
} |
|||
|
|||
protected virtual void SetEditorProperties() |
|||
{ |
|||
//TODO: override in derived classes to specify custom value type
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue