I need to use a hidden xamMaskedEditor to take a mask and a data value and calculate the end result of the data applied to that mask. For example, say the data value was "12345" and the mask was "##-#-##", I need to get "12-3-45" out.
I'm filling in the Mask, DisplayMode, DataMode, PadChar, ValueType, and Value properties in this hidden xamMaskedEditor, but after doing this I don't see any property that contains the end result that I'm looking for.
Is there a method that I need to call to make this happen? Or something else I need to do?
Also, once the end result has been calculated, which property would I find that in? I would expect to see that in the Text property, but that is blank in my case.
Thank you for your help,Jim Honeycutt
Thanks for your help Petar. I was actually setting the same fields, but doing so in code-behind using a newly instantiated xamMaskedEditor that wasn't connected to the visual tree. I still couldn't get it to work, so I finally just added the xamMaskedEditor to the visual tree (with Visibility = Collapsed) and bound all of those properties to the ViewModel, and it worked after that. I'm not sure what the difference was with what I was originally doing, but I have it working now so I'm not too concerned. :-)
Thanks again,Jim
Hello Jim,
I have been looking into your requirement and you are on the right track, actually the XamMaskedEditor’s Text property is the one that should do what you require. I have taken the liberty of creating a sample project that shows it in action (MaskedEditor_result.zip). I assume there must be something to your scenario that I am not aware of, for you to get a different result.
Please look in to the sample and let me know if there is anything I have missed and if I can be of any further assistance on this matter .