When I tried to use spell check on one of the textfields that was added directly to my user control where the spell check control was added, it works perfectly fine.
But in my scenario, I have a user control that repeats another usercontrol, say uc1 using a stackpanel and ItemsControl which inturn has a textfield, say txt1. My goal is to have a single button in the outside usercontrol that spell checks all values in txt1. I'm not sure what should I mention under XamSpellChecker.SpellCheckTargets in this case.
Whatever I tried so far did not work.
Hello Jatin,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you with the functionality you want. Basically I added a Dependency Property to the UserControl and bound it the TextBox’s Text Property in it and in the MainPage I add the UserControl’s Text Property to the XamSpellChecker’s SpellCheckTargets collection.
Feel free to write me if you have further questions.