views:

58

answers:

1

This question is for Windows Phone 7.

I'd like to send the user to a specific external URI when the entire ListBox item is clicked (not HyperLinkButton). I already have a MouseLeftButtonUp event handler for the item. At this point, I can't find a way to navigate the user to the URI.

A: 

You can listen for the SelectionChanged event on your ListBox and navigate to the URI in the event handler. The AddedItems property of the SelectionChangedEventArgs object passed to the event handler can then be used to retrieve the item that the user selected.

Or you can also bind the SelectedItem property of your ListBox to one of your properties and navigate to the URI in the set accessor of this property.

Andréas Saudemont