locked
Listbox Value Retrieving! RRS feed

  • Question

  • Hi I am New in WPF I have A list box contain Textblock and Textbox I want to retrieve the value of those textblock and textbox I have add those text box and block programmatic/Automatically so don't have any name reference to get text in that please let me how i can do you :(

    Thanks 


    Regards, Muhammad Asif
    Saturday, October 29, 2011 1:12 PM

Answers

  • var textblock = this.ListBox1.Items[0] as TextBlock;
    

    • Marked as answer by capripio Monday, October 31, 2011 8:06 PM
    Saturday, October 29, 2011 3:34 PM

All replies

  • var textblock = this.ListBox1.Items[0] as TextBlock;
    

    • Marked as answer by capripio Monday, October 31, 2011 8:06 PM
    Saturday, October 29, 2011 3:34 PM
  • Thanks It's help me and more problem what if i want to retrieve value from Stackpanel where are one textblock and image and retrieve only textblock value how i can do this?

     

    Thanks :D


    Regards, Muhammad Asif
    Monday, October 31, 2011 8:08 PM