' page var
Private WithEvents mspellChecker As XamSpellChecker
' page load event
Dim spellBinding As New Binding() spellBinding.Mode = BindingMode.TwoWay Dim propPathSpellBinding As New PropertyPath("Text") spellBinding.Path = propPathSpellBinding spellBinding.Source = Me.narrative mspellChecker = New XamSpellChecker() mspellChecker.DictionaryUri = New Uri("Dictionaries/english-generic-whole.dict", UriKind.Relative) mspellChecker.SpellCheckTargets.Add(spellBinding) Me.LayoutRoot.Children.Add(mspellChecker) ' button click event Private Sub btnSpellCheck_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSpellCheck.Click Try mspellChecker.SpellCheckDialog.StartupPosition = StartupPosition.Manual mspellChecker.SpellCheckDialog.Top = 50 mspellChecker.SpellCheckDialog.Left = 50 mspellChecker.SpellCheck() Catch ex As Exception ErrorHandler(ex) End Try End Sub the dictionaries are in teh clientbin folder on the website with the xap file clientbin dictionaries xxxxx.xap
Dim spellBinding As New Binding() spellBinding.Mode = BindingMode.TwoWay Dim propPathSpellBinding As New PropertyPath("Text") spellBinding.Path = propPathSpellBinding spellBinding.Source = Me.narrative mspellChecker = New XamSpellChecker() mspellChecker.DictionaryUri = New Uri("Dictionaries/english-generic-whole.dict", UriKind.Relative) mspellChecker.SpellCheckTargets.Add(spellBinding) Me.LayoutRoot.Children.Add(mspellChecker)
' button click event
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSpellCheck.Click Try mspellChecker.SpellCheckDialog.StartupPosition = StartupPosition.Manual mspellChecker.SpellCheckDialog.Top = 50 mspellChecker.SpellCheckDialog.Left = 50 mspellChecker.SpellCheck() Catch ex As Exception ErrorHandler(ex) End Try End Sub the dictionaries are in teh clientbin folder on the website with the xap file clientbin dictionaries xxxxx.xap
Private Sub btnSpellCheck_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSpellCheck.Click Try mspellChecker.SpellCheckDialog.StartupPosition = StartupPosition.Manual mspellChecker.SpellCheckDialog.Top = 50 mspellChecker.SpellCheckDialog.Left = 50 mspellChecker.SpellCheck() Catch ex As Exception ErrorHandler(ex) End Try End Sub
the dictionaries are in teh clientbin folder on the website with the xap file
clientbin
dictionaries
xxxxx.xap
I can get to the dictionary file in my local dev enviroment but when uploaded to the server I can't get to the dictionary file. When I try to navigate to the dictionary file I get an HTTP Error 404.0 - Not Found. Where should the dictionary file go? root? clientbin?
The documentation instructs to put the dictionary in "<root>/ClientBin/Dictionaries/us-english-v2-whole.dict". This is the current setup I have and It works locally but not on dev server.
Hi,
The error message indicates that the dictionary is not found in the given location. Could you check which is the home directory for your web site and verify the relative path to the dictionary is correct ?
Another thing you could try is to enter the path to the dictionary directly in the browser and see if it can be accessed. It should be something like "http://localhost:port/Dictionaries/us-english-v2-whole.dict".
Hope this helps,
I did as suggested and captured the error but all i got was "The remote server returned an error: NotFound."
My dictionary file is in the clientbin folder of my aspx web app.
Here is my spellchecker xaml.
<ig:XamSpellChecker x:Name="simpleSpellChecker"
Visibility="Visible"
DictionaryUri="Dictionaries/us-english-v2-whole.dict"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ig:XamSpellChecker.DialogSettings>
<ig:XamSpellCheckerDialogSettings
SpellCheckDialogStyle="{StaticResource SpellcheckDialog}" />
</ig:XamSpellChecker.DialogSettings>
<ig:XamSpellChecker.SpellCheckTargets>
<Binding ElementName="txtSpell" Path="Text" Mode="TwoWay" />
</ig:XamSpellChecker.SpellCheckTargets>
</ig:XamSpellChecker>
HI,
I am following up on this forum thread, please let me know if you require further assistance.
Sincerely Matt Developer Support Engineer
this is most probably an issue with downloading the dictionaries. You could add an event handler to DictionaryDownloadCompleted event and check the e.Error argument to see if something's wrong with downloading the dictionary.