Click here to Skip to main content
13,300,002 members (62,574 online)
Rate this:
Please Sign up or sign in to vote.
See more:

This may look like funny. But seriously I was unable to type any text inside my WPF textbox. I am using windows form project and WPF project in a single solution. In this I add textbox to any pages at WPF project, textbox is not able to type a text. If I do with separate solution that only have WPF project then I was able to type a text inside the textbox. In the solution I have both windows application and WPF application, even I create a new page in WPF and put textbox, I was unable to type anything inside that textbox. Can any one help me. Please.

The coding of both.

I removed the "<" this on "Windows and Grid" tag because if it put that then those codes are not showing.

This is code working:

    Window x:Class="WpfApplication1.Window2"
        Title="Window2" Height="300" Width="300">
        <textbox horizontalalignment="Left" height="23" margin="81,113,0,0" textwrapping="Wrap" text="TextBox" verticalalignment="Top" width="120" />

And this is code that not working:

Window x:Class="Reports.Wait_Screen"
        xmlns:x="" Height="300" Width="300" WindowStyle="None" IsTabStop="False">

        <Label Content="Please Wait" HorizontalAlignment="Left" Margin="108,112,0,0" VerticalAlignment="Top" Width="83"/>
        <textbox horizontalalignment="Left" height="23" margin="35,217,0,0" textwrapping="Wrap" text="TextBox" verticalalignment="Top" width="120" />
Posted 19-Nov-12 2:12am
Updated 19-Nov-12 22:24pm
Krunal R 19-Nov-12 7:14am
Show both the code
ssyuvaraja 19-Nov-12 22:39pm
I updated question with coding. So please check that.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I have seen this, 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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Without seeing your code, the only thing that I can see that would cause this would be if you were somehow adding a Windows Forms control textbox to your WPF form instead of using the WPF textbox control. That might cause this issue. Otherwise it is most likely a Visual Studio installation issue.

One test that I can see would be to manually type out a new WPF textbox control in the XAML instead of dragging and dropping one on. See if it still doesn't work.
ssyuvaraja 19-Nov-12 22:37pm
Please check the updated question. I added those coding. Can you help using those.
ssyuvaraja 27-Nov-12 23:40pm
Its not worked. Also if windows application and WPF application are in single solution the text enter is not working and also at key down action the enter key and space key are not working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 10 Sep 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100