I have followed the sample XAML code but am getting 'Object reference not set to an instance of an object' errors with the XamFormulaEditor. The XAML code is:
<Grid> <Grid.Resources> <ig:XamCalculationManager x:Key="CalculationManager" x:Name="CalcManager" FormulaCalculationError="CalcManager_FormulaCalculationError"></ig:XamCalculationManager> </Grid.Resources> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> </Grid.RowDefinitions> <StackPanel> <TextBox x:Name="a" ig:XamCalculationManager.CalculationManager="{StaticResource CalculationManager}" Width="40"/> <TextBox x:Name="b" ig:XamCalculationManager.CalculationManager="{StaticResource CalculationManager}" Width="40"/> <TextBlock x:Name="FormulaString" ig:XamCalculationManager.CalculationManager="{StaticResource CalculationManager}"> <ig:XamCalculationManager.ControlSettings> <ig:ControlCalculationSettings Formula=""/> </ig:XamCalculationManager.ControlSettings> </TextBlock> <ig:XamFormulaEditor Target="{Binding ElementName=FormulaString}"/> </StackPanel> </Grid>
The error occurs when having clicked the Fx button to open the editor I double-click one of the nodes under controls so the formula becomes [//a] + [//b] and click OK. At that point the exception is thrown. The odd thing is that the exception is not thrown all the time. Sometimes the formula [//a] + [//b] will work correctly.
Hello,
Thank you for your post. I have been looking into your issue and following the provided code, I could not managed to reproduce it. I have not the event handle code for ‘FormulaCalculationError’ event. I am attaching the sample application(FormulaEditorDialogIssue.zip) that I have used for my tests. Please add the code in the event handler and provide me with the exact number that you enter in the TextBoxes.
Also please tell me the specific version of our assembly files that you are using like : 13.1.20131.1009.
Looking forward to hearing from you.
Hello obiwanzamora,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support