Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
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:
 
    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">
 
And this is code that not working:
 
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">
Posted 19-Nov-12 1:12am
Edited 19-Nov-12 21:24pm
Programm3r11.3K
v3
Comments
Krunal R at 19-Nov-12 7:14am
   
Show both the code
ssyuvaraja at 19-Nov-12 22:39pm
   
I updated question with coding. So please check that.
Rate this: bad
good
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.
  Permalink  
Comments
ssyuvaraja at 19-Nov-12 22:37pm
   
Please check the updated question. I added those coding. Can you help using those.
ssyuvaraja at 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.
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 CPallini 365
1 Sergey Alexandrovich Kryukov 277
2 OriginalGriff 165
3 George Jonsson 159
4 Richard MacCutchan 110
0 OriginalGriff 6,344
1 Sergey Alexandrovich Kryukov 5,860
2 CPallini 5,125
3 George Jonsson 3,559
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 10 Sep 2014
Copyright © CodeProject, 1999-2014
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