Hi there
I want to use XamNumericEditor with mask and data binding. My mask is "########.##". When I don't use data binding, control is working OK. But when I use data binding data from control is not valid. If I write 123.12 control send me 12312.
Any idea how this should be solved?
Thanks for your advice
Kapo
Hi Matt,
Thanks for posting the code to demonstrate the issue. We've looked at it and determined that it's a bug. We've taken a note of it in our bug tracking system and it will be fixed in the next hotfix release.
Sandip
Hi Kapo,
'#' mask characters are for textual input (like phone). For numeric input you should use 'n' mask character, like 'nnnnnnnn.nn' or other numeric masks like {double:-8.2:c} (see docs for more info and full listing of available masks). Using a numeric masks, the following binding works for me, both ways:
<TextBox Grid.Row="2" Name="textBox" />
Hope this helps,
See what I mean:
<Page x:Class="MyTest.BugQA" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igEditors="http://infragistics.com/Editors" Title="Bug"> <Page.Resources> <XmlDataProvider x:Key="TheBugs" XPath="/InfragisticBugs"> <x:XData> <InfragisticBugs xmlns=""> <InfragisticBug Type="WorseThanWPFCore">Validation error events on XamEditors dont expose what rule caused the failure.</InfragisticBug> <InfragisticBug Type="CompleteQADisaster">XamEditors are pointless in any data binding scenario. So much for achieving consistency.</InfragisticBug> <InfragisticBug Type="WebEditor">Most of the class API when searched via the Search on documentation 404s.</InfragisticBug> </InfragisticBugs> </x:XData> </XmlDataProvider> <DataTemplate x:Key="Template1"> <StackPanel Orientation="Horizontal"> <TextBox Text="{Binding XPath=.}" Width="150" ></TextBox> <igEditors:XamTextEditor Text="{Binding XPath=.}" Width="150" /> <TextBox Text="NoneBindingTest" Width="150" ></TextBox> <igEditors:XamTextEditor Text="NoneBindingTest" Width="150" /> </StackPanel> </DataTemplate> </Page.Resources> <StackPanel> <TextBlock>Data Items</TextBlock> <ListBox Background="Yellow" DataContext="{StaticResource TheBugs}" ItemsSource="{Binding XPath=//InfragisticBug}" ItemTemplate="{StaticResource Template1}" > </ListBox> </StackPanel></Page>
I think this is related to my post in xamEditors. It seems the Infragistics editors will only work outside of data binding, stick them in a listview or itemscontrol or any scenario where name/uid is dynamic etc.. and they behave very strangely. I came here today to see if any responses but I think Im gonna give Infragistics a miss now for a few months, I dont think they'll be ready to charge the full $800 for a very long time..