Why does my WPF TextBox not show any characters?
I have an application which includes a DLL written in WPF. This application starts with the login window (the appl开发者_运维技巧ication is a Windows Form and the DLL is in WPF). When I type the user name or password I can't see the characters in the textbox, but they are saved in the Text
1 property of both the textBox or the passwordBox as expected.
What could explain this behavior, and how can I fix it so that I see the characters as they're typed?
Maybe could it be the foreground color which is equal to the background color ? If you try selecting text after typing, do you get something ?
the foreground and the background are not the same, i have checked it... i get the text i type in but i can't see it, this is the most weird thing i have ever seen....i have opened another project
I have seen this in your scenario: when the WPF window is hosted from a Windows Form application.
You need to run the WPF window in a separate thread to avoid this problem.
精彩评论