Hi Infragistics,
Is there a particular reason for hiding the decimal point automatically in an empty XamNumericEditor if PromptChar has been set to empty.
<igEditors:XamNumericEditor x:Name="_brokerFeeBPSEditor" PromptChar="" />
In this case I can only see the decimal point if there's value entered in the editor otherwise it's hidden. Which is not the case if I use any PromptChar set, where I can always see the decimal point in the middle.
Thanks,
Andor
HI Andor,
I am just following up on this forum post.
If you need further assistance regarding this thread, please let me know.
Sincerely,
MattDeveloper Support Engineer
Answer to your question
If I set PromptChar, dp is visible even if there's no value in the editor, otherwise dp disappears when editor gets cleared. What's the reason for that?
This behavior is intentional. The reason for hiding the ‘.’ when the editor’s value is empty and when the prompt char is set to no character is that without the prompts showing only the decimal ‘.’ separator doesn’t look good.
Matt
Developer Support Engineer
Hi Matt,
Thanks for chasing this. Actually the problem with not setting PromptChar is not the positioning, but the visibility of the decimal point. If I set PromptChar, dp is visible even if there's no value in the editor, otherwise dp disappears when editor gets cleared. What's the reason for that?
Positioning has been workarounded by the following logic:
editor.KeyUp += (sender, args) =>{ XamNumericEditor s = (XamNumericEditor)sender; if (args.Key == Key.Delete && s.Value == System.DBNull.Value) { s.SelectAll(); s.Delete(); }};
The above logic moves the curser to the left hand side of the dp after hitting the last delete and editor gets cleared.
Regards,
Please let me know if you require further assistance regarding this post. Sincerely, Matt Developer Support Engineer
Not setting the prompt character causes the cursor to be positioned to the far right.
It gives you free formatting capabilities. If you have additional questions regarding this forum, please feel free to get back to me.
Matt, Developer Support Engineer