Skip to main content

Microsoft Silverlight

Empty TextBox and END key pressedRSS Feed

(0)

pavelsua
pavelsua

Member

Member

10 points

9 Posts

Empty TextBox and END key pressed

Hi,

I found a problem in TextBox control. If there is no text in TextBox and you type END (key) then your TextChanged event handler become inactive and you can't bring it to life again! And after you had lost your TextChanged handler every char you type apears in textbox with time delay (near a second).

Can anyone explane me this, or it's a bug?

mchlsync
mchlsync

Star

Star

14566 points

2,730 Posts

Silverlight MVP

Re: Empty TextBox and END key pressed

Hi, I just checked. it works in my machine. What version of SL, browers are you using? Can you give us the steps to reproduce this issue?

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


pavelsua
pavelsua

Member

Member

10 points

9 Posts

Re: Re: Empty TextBox and END key pressed

I using Windows 2003 server, IE 7 (build 5730) with SL 2.0 beta.

To reproduce this bug I wrote simple xaml with one textbox in grid:

<Grid x:Name="LayoutRoot"><TextBox ></Grid>

pavelsua
pavelsua

Member

Member

10 points

9 Posts

Re: Re: Re: Empty TextBox and END key pressed

Sorry for previous post - it's not complete!

Step 2: add two event handlers to the Txt in Page.Loaded event handler

Txt.KeyDown += new KeyDownEventHandler(Page_KeyDown);

Txt.TextChanged += new RoutedEventHandler(Page_TextChanged);

Step 3: while textbox doesn't contain any text press END key and try to type something after that - Page_TextChanged never calls

pavelsua
pavelsua

Member

Member

10 points

9 Posts

Re: Re: Re: Re: Empty TextBox and END key pressed

And here is a complete xaml just in case:

<UserControl x:Class="endTest.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Grid x:Name="LayoutRoot" Background="White">

<TextBox x:Name="Txt" KeyDown="Page_KeyDown" TextChanged="Page_TextChanged" />

</Grid>

</UserControl>

mchlsync
mchlsync

Star

Star

14566 points

2,730 Posts

Silverlight MVP

Re: Re: Re: Re: Empty TextBox and END key pressed

Oh. yes. I'm able to reproduce this issue. Additional to this, if you select the text and press "Delete" button after following your steps, it will crash the browser..

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


pavelsua
pavelsua

Member

Member

10 points

9 Posts

Re: Re: Re: Re: Empty TextBox and END key pressed

So if I understand you correctly this issue appears only in 2003 server?

mchlsync
mchlsync

Star

Star

14566 points

2,730 Posts

Silverlight MVP

Re: Re: Re: Re: Empty TextBox and END key pressed

pavelsua:
So if I understand you correctly this issue appears only in 2003 server?
 

I tested in Vista Home Premium and IE7 + Firefox 2.0.0.13. I got this error. but I tried with IE6 on WindowsXP when I was in Office. I think it was working fine. I have to double-check.   

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


mchlsync
mchlsync

Star

Star

14566 points

2,730 Posts

Silverlight MVP

Re: Re: Re: Re: Empty TextBox and END key pressed

I have tested with IE6 on Windows XP. Yes. It is not working.  

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities