×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2013
    Location
    chennai, TN
    Posts
    56

    In my page I have an problem with textblock

    hi... guys..

    In my page i have an problem that is i have an listbox, the listbox contains textblock ,
    if i click that textblock, the textblock content need to be placed in another xaml page button..

    If the Textblock contains single content means easily we can send but for textblock i have used the binding concept i.e (<textblock text={Binding Name,mode=twoway}>)

    Name contains many items ..... so guys

    please guide me

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    552

    Re: In my page I have an problem with textblock

    What you need to search for is...

    * How to get the data from the element (eg. TextBlock) the user tapped on - SelectionChanged event
    * Page navigation, how to pass data between pages.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: In my page I have an problem with textblock

    You can pass parameters to another XAML page using param=value to the uri as such "page1.xaml?paramName=Helloworld"

  4. #4
    Registered User
    Join Date
    Jan 2013
    Posts
    34

    Re: In my page I have an problem with textblock

    And it might help if you do not think of passing around XAML content or properties but always binding to some data.

    So, instead of sending the text to another page, you can send the ID of the item using the technic that shai.i mentioned. On the other page, just bind the content of the button to the Name property of the data context.

    By the way, why are you declaring a two way binding for the text block's text?

  5. #5
    Registered User
    Join Date
    Sep 2013
    Posts
    5

    Re: In my page I have an problem with textblock

    If you are creating a list of strings for example and binding it to appear in the listbox you can add an id parameter and then add an event from the listbox events ontap for example such that when you tap the screen the name will be copied and having the id as a parameter you can know which listitem is being copied

Similar Threads

  1. bind linq to textblock without listBox.ItemsSource
    By thejeraldo in forum Windows Phone General
    Replies: 2
    Last Post: 2012-02-27, 11:52
  2. html formatting in xml retrieve to textblock
    By thejeraldo in forum Windows Phone General
    Replies: 1
    Last Post: 2012-02-21, 07:33
  3. Replies: 4
    Last Post: 2010-07-21, 13:43
  4. Replies: 11
    Last Post: 2008-03-08, 18:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×