Silverlight xaml: building/concatenating Uris or other strings
I have a HyperlinkButton in a ListBox, the latter being bound to a list of items. I want the HyperLinkButton's Uri to be bound in this sort of fashion:
NavigateUri="/some/url.xaml?tag={Binding}"
Which obviously doesn't work, but you get the idea. Does开发者_StackOverflow anyone have a nice workaround for this? Preferably something compatible with WP7. Thanks!
I would think that a value converter would be easy and give you a bit of flexibility without obscuring the xaml too much. If your URL doesn't change your in easy street, otherwise you'll need to pass in the URL to the converter, possibly from somewhere else.
Peter Torr covers navigation redirection on Windows Phone 7 here quite well.
Redirecting an initial navigation - Peter Torr's Blog
An accompanying post that may also be of value.
Introducing the concept of “Places” - Peter Torr's Blog
精彩评论