Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

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:

XML
    Window x:Class="WpfApplication1.Window2"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window2" Height="300" Width="300">
    Grid>
        <textbox horizontalalignment="Left" height="23" margin="81,113,0,0" textwrapping="Wrap" text="TextBox" verticalalignment="Top" width="120" />

    /Grid>
/Window>


And this is code that not working:

XML
Window x:Class="Reports.Wait_Screen"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300" WindowStyle="None" IsTabStop="False">


    Grid>
        <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" />

    /Grid
/Window>
Posted
Updated 2-Dec-21 20:50pm
v3
Comments
[no name] 19-Nov-12 7:14am    
Show both the code
ssyuvaraja 19-Nov-12 22:39pm    
I updated question with coding. So please check that.

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.
 
Share this answer
 
Comments
Member 12646489 10-May-18 0:14am    
Even Im facing the same issue? Can someone help please
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.
 
Share this answer
 
Comments
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.
I see, i also have the same problem with you, you need to remove IsHitTestVisible="False"

Original: Title="Barangay Database System" Height="373" Width="546" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False" IsHitTestVisible="False">

New:Title="Barangay Database System" Height="373" Width="546" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False">

as you can see I remove IsHitTestVisible="False" and I can able to type now

hope it helps
 
Share this answer
 
Comments
OriginalGriff 3-Dec-21 3:40am    
While I applaud your urge to help people, it's a good idea to stick to new questions, rather than 8 year old ones. After that amount of time, it's unlikely that the original poster is at all interested in the problem any more!
Answering old questions can be seen as rep-point hunting, which is a form of site abuse. The more trigger happy amongst us will start the process of banning you from the site if you aren't careful. Stick to new questions and you'll be fine.
Richard Deeming 3-Dec-21 4:45am    
The only mention of IsHitTestVisible on this page is in your solution. The OP had not set that property anywhere.

If you're going to resurrect ancient questions to post a new solution, make sure you've read and understood the question, and that you're adding something new to the discussion.
Hi,
Have you try to add a stackpanel that include both controls or create 2 rows for the grid and place each control in a row.
 
Share this answer
 
Comments
Dave Kreskowiak 3-Dec-21 8:04am    
Look at the date of the original question before posting anything. You're not going to get an answer from the OP.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900