Hello,
I am programmin a silverlight data grid. The data basis is a list of stocks, which all have a Symbol (e.g. YHOO, SAP ...) I am defining a column with a Hyperlink which will lead the user to another page of the same silverlight app (UrlRouting).
<data:DataGridTemplateColumn Header="Chart"><br/>
<data:DataGridTemplateColumn.CellTemplate><br/>
<DataTemplate><br/>
<StackPanel><br/>
<HyperlinkButton NavigateUri="/ChartPage/{Binding Path=Symbol}" <br/>
TargetName="ContentFrame" Content="{Binding Path=Symbol}"/><br/>
</StackPanel><br/>
</DataTemplate><br/>
</data:DataGridTemplateColumn.CellTemplate><br/>
</data:DataGridTemplateColumn>
See, there is twice the Markup Expression
{Binding Path=Symbol} :
The first one provides the NavigateUrl (e.g. "/ChartPage/YHOO" )
The second one provides the label name of the hyperlink.
My Problem: The second expression will be translated, but not the first. So the label is written correctly ("YHOO"), but the Uri will end in "/ChartPage/{Binding Path=Symbol}", which I can see in the Browser.
Why there will be only one Markup Expression "translated"?
To be complete, here is the definition of the UriMapper:
<uriMapper:UriMapper>
<uriMapper:UriMapping Uri="" MappedUri="/Views/ScreeningTable.xaml"/>
<uriMapper:UriMapping Uri="/ChartPage/{Symbol}" MappedUri="/Views/ChartPage.xaml?symbol={Symbol}"/>
<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
</uriMapper:UriMapper>
The UriRouting works fine, e.g. "/About" will deliver the "/Views/About.xaml" page!
Any hint is appreciated.
Herbert