Hi,
I am using NetAdvantage for WPF and would like to add spin buttons, i.e. up and down buttons to a XamNumericEditor. How can I do that? Setting SpinWrap to true did not work.
For this, you would have to retemplate the editor (the EditTemplate) and put buttons (up/down) inside the ControlTemplate. You can see the default style in the DefaultStyles directory an use it as a base for your custom one.
Let me know if you have questions on this.
Any plan to add it as a control in netadvantage for wpf?
I have the same request and I want a control I can just drag and use.
ps
Currently I added extended wpf toolkit (community version) as the solution.
Hello Fei,
I created a sample project for you with the functionality you want. Basically I created a Style for the SpinButton and added EventSetter for its Click event. In the handler I get the CaretElement and made its Background Transparent. I also handled the XamTextEditor’s PreviewMouseLeftButtonDown event in order to make the Caret visible again when you click in the Editor. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Great!
Actually I'm using v2013.1, I didn't realize it until see your link.
By the way, is there a way to hide the caret during clicking the spin buttons?
Our latest version of XamNumericEditor control has this functionality (Spin Buttons). You can use the SpinButtonDisplayMode and SpinIncrement Properties in order to turn this functionality on. Here you can find more inforamation about them:
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/InfragisticsWPF4.Editors.v13.1~Infragistics.Windows.Editors.XamMaskedEditor~SpinButtonDisplayMode.html
and
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/InfragisticsWPF4.Editors.v13.1~Infragistics.Windows.Editors.XamMaskedEditor~SpinIncrement.html
Hope this helps you.