i don't want the control to be editable. i it to be able to use the up and down arrows to change the number and that is it.
is it possible?
Hello,
What you could do in your case is to set the ReadOnly property of the editor to true and then handle its KeyDown event to replicate its default behavior when the up and down keys are pressed.
I have attached a sample which demonstrates this suggestion.
Please let me know if you have any additional questions.
at the end since it is so difficult to change the images and even when the readonly is true u still get the in edit look even though u can't ride i used 2 pics and a label to do everything...
is there a way though to loose the in edit look? shouldn't it be untouchable when it's read only ?
What you could do in order to not get the “in edit” look is to cancel the BeforeEnterEditMode event. After that you need to handle the PreviewKeyDown event of the editor and check if the user has pressed the up or down key. If that is the case set the IsInputKey property of the event args to true. This way the up and down key won’t be ignored by the editor. Now you can handle the KeyDown event and use it to increment or decrease the value in the numeric editor.
Please note that our controls behave this way when you set them to ReadOnly, following the default controls behavior from Microsoft (for example a TextBox).
I have modified my sample so it now uses the approach that I have described.
all is good now
10x:)