Hi,
i want to do some styling for xamNumericInput.
1.Spin Button(up/down) : BackGround to #232323 and arrow to black2.TextBoxLineDrawingVisual : when user enter text in the xamNumericInput textBox there is one white line is getting shown like e.g. "_____546.0" i want to change it to " 546.0".3.when user edit it/ change the text of it. BorderBrush : Grey (currently lightBlue).
a sample style would be great.
Regards,Kamlendra
Hello Kamlendra,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style of the XamNumericInput and the Styles it uses and modified them in order to achieve the 1st and 3rd requirement. For the 2nd one I set the XamNumericInput’s PromptChar Property to “ ”. If the Styles doesn’t satisfies all your needs, feel free to modify them as per your requirements. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
You should add the InfragisticsWPF4.Controls.Editors.XamMaskedInput and InfragisticsWPF4 dlls manually since the sample is build under version 13.2. Also in the XamNumericInputs template there is an element called MainBorder, the first element in the ControlTemplate and it is a ValidationDecorator, which is not available in version 11.2, so you should change it to be Border. Please let me know if this helps you or you have further questions on this matter.
i already referred the dlls . using Border was key. Thank you!!
Hello kamlendra,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Stefan,
point number 2 is solved by PromtChar="". Thanks!!but the style which you have shared is screwing up the appearance of the controla)when entering the value. --- text shifting left-right abruptly. b)up/down value blinks....
so, i am not using this style(i don't need that much customization.). i don't want to include the spin button inside my text input box let it outside only .simple change: BgBorder -->GreyspinButtonStyle background -->Grey
I have modified the sample, so now it works as you want. Basically I changed the PromptChar to be "" instead of " ". I also changed the colors as per your requirements. Please let me know if this helps you or you have further questions on this matter.