locked
text input box RRS feed

  • Question

  • How can you capture input text in silverlight? I know you can overlay html to do this but I'd rather it be within silverlight. Is there a control or another way?

     

    Friday, May 30, 2008 8:12 PM

Answers

  • SL2 has new textbox controls, not sure how they work with javascript though.

    SL1, you have to make them. Here is a SL1 tutorial I have that you can download:

    http://www.gjhdigital.com/gjhdigital/sl/keyboard/

    For characters like the period "." you have to use the numeric key (I guess it would be concidered the decimal point) when entering in an email address in my tutorial. its just a limitation of SL1 as the "." and some other characters all return the same value which is null or a space.

    hope this helps.

     

    Wednesday, June 4, 2008 2:12 PM

All replies

  •  if your talking about SL1 then you are limited as it doesnt recognize characters like: @

    but if you download the 1.0 SDK there is a tutorial in there under the how-to topics/fundamentals.

    And the way I have done it is update a TextBlock control on every keyup and then sending the textblock's value to whatever you want 

    Friday, May 30, 2008 10:30 PM
  • Thanks but what about with SL2? I couldn't find the tutorial you mention. There is no "how-to topics/fundamentals" directory in the 1.0 SDK i downloaded.  There's quickstarts but nothing on text input. All the examples i've seen so far use HTML input boxes overlayed on top of Silverlight which seems like a really janky approach.

    Wednesday, June 4, 2008 1:06 PM
  • SL2 has new textbox controls, not sure how they work with javascript though.

    SL1, you have to make them. Here is a SL1 tutorial I have that you can download:

    http://www.gjhdigital.com/gjhdigital/sl/keyboard/

    For characters like the period "." you have to use the numeric key (I guess it would be concidered the decimal point) when entering in an email address in my tutorial. its just a limitation of SL1 as the "." and some other characters all return the same value which is null or a space.

    hope this helps.

     

    Wednesday, June 4, 2008 2:12 PM