Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Issue with tabbing through controls in wpf user control with WindowsFormHost

$
0
0

Hi,

I am using a  wpf user control to load as part of a word add in to launch and get user inputs for a letter template. Multiline text box was giving me issues here. It throws System.InvalidOperation exception "Dispatcher processing has been suspended, but messages are still being processed." This happened when the user tried to enter text, paste information etc. (Please note this template was developed for German Language Settings).

After several attempts, I decided to use a WindowsFormHost to host the textbox control within the wpf user control. Now the issue is that I am not able to tab through the controls. Once I reach the textbox, instead of going to the next control, it will just tab space inside the control. I came across the link below when I googled for some help on this topic.

http://social.msdn.microsoft.com/Forums/vstudio/en-US/054d8509-dd2d-4b60-9b0a-383b0147e2ac/keyboard-focus-navigation-problem-with-elementhost-hosted-wpf-view-with-windowsformshost-hosted

I followed the suggestion Yves Zhang and created a custom panel control and wrapped the windows control inside it. However, focus does not move to the next control. The link with the sample code on the above link does not work either. Is it possible that someone would be able to send me the sample code mentioned here?

Many thanks,

Anu


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>