I'm having some issues getting the XamMaskedEditor Converter to work, and I'm not sure if it's my approach or something I'm missing. I'm trying to get a time format mask and convert that to a timespan (e.g. hh:mm:ss).
In NetAdvantage for WinForms I accomplished this via a DataFilter on my UltraMaskedEdit. I thought I could accomplish the same thing with the XamMaskedEditor and similar ValueToDisplayTextConverter/ValueToTextConverter converters. However, when I set both of these up, XamMaskedEditor doesn't seem to respect the converter in edit mode. DisplayMode appears to work correctly.
Are there any examples out there of something similar? The documentation refers to a similar case here: http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/xamEditors_Overview_of_the_ValueEditor_Class.html
but I have not been able to find code/examples in the rest of the docs or the feature browser.
Is this the correct approach, or is the appropriate replacement for the DataFilter functionality at the DataBinding instead?
Any help is appreciated. Thanks,
- Micah
Hello Micah,
From your post, it sounds like you have set up the converters correctly. Would you provide me a snippet of code and XAML or a sample project which will demonstrate the approach you are taking. I should be able to take a closer look and determine why the converters are not working as you would expect. If you want to attach a sample project, you are welcome to email me the project directly if you would prefer to keep any of the code confidential.
Thank you,
Curtis,
I've enclosed a test project, for you to see. The steps I'm using to replicate the problem I'm seeing is:
1. Click into the XamMaskedEditor
2. Type in 024, then hit tab to blur the focus. The "Value:" correctly displays 86400, which is 24 hours in seconds. The XamMaskedEditor correctly displays "024:00:00". I've attached xme_1.png as the result.
3. Click into the XamMaskedEditor again. The XamMaskedEditor shows "864:00:00" This is unexpected. I've attached xme_2.png as the result.
Thanks,
Micah Tan
P.S. I just tried attaching the two images, and I can't seem attach multiple files -- I've included them in the zip.