Hi,
I am using xamSpellChecker in the following scenario:
"I have a popup with a multi-line text box. Once the user is done with his/her input in the textbox and clicks on OK button of the popup, the spell checker should come into action."
If there are any spelling errors detected, then the spell check dialog box is displayed and everything works fine as expected.
The problem comes when there are no spelling errors in the user's input. If there are no spelling errors, the spellcheckcompleted method is called with the (spell checker) dialog state as "InActive" FOR THE FIRST TIME. The user has to click on the "OK" button of the popup again and this time the spellcheckcompleted method is called with the dialog state as "Active" and it works as expected. Could you please indicate why is this happening?
PS: In the spellcheckcompleted method, I am putting the spell checker dialog window state as hidden because I dont want the user to see the spell check dialog with "OK" button incase there are no spelling errors. But right now the user will have to click "OK" of the popup twice to close it in case of no spelling errors.
Any suggestions/help please?
I tested your scenario and wasn't able to reproduce the issue as you describe it. I used the following code:
<sdk:ChildWindow> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="300"/> <RowDefinition/> </Grid.RowDefinitions> <TextBox x:Name="SpellCheckTextBox"/> <Button Grid.Row="2" Content="Check Spelling"> <ig:Commanding.Command> <ig:XamSpellCheckerCommandSource CommandType="SpellCheck" EventName="Click" TargetName="TestSpellChecker" /> </ig:Commanding.Command> </Button> <ig:XamSpellChecker x:Name="TestSpellChecker" SpellCheckCompleted="igSpellChecker_SpellCheckCompleted" UserDictionaryUri="http://localhost:2000/English.txt"> <ig:XamSpellChecker.SpellCheckTargets> <Binding ElementName="SpellCheckTextBox" Path="Text" Mode="TwoWay" /> </ig:XamSpellChecker.SpellCheckTargets> </ig:XamSpellChecker> </Grid> </sdk:ChildWindow>
The 'SpellCheckCompleted' event is fired only once.
I also tested with the following logicin the event handler:
private void igSpellChecker_SpellCheckCompleted(object sender, Infragistics.Controls.Interactions.SpellCheckCompletedEventArgs e) { var dlg = this.TestSpellChecker.SpellCheckDialog; if (e.Error == null) { dlg.Close(); } }
and it worked as expected.
Could you please clarify what your issue is and provide some code snippets so that I know what to look for?
Also, which Volume Release are you using and have you applied any Service Release?
Thanks,