I am using Silverlight and C#. I have 3 hyperlink buttons and 3 textblocks. I have a ViewModel which I bind a property to each of the hyperlink buttons. I would like to replicate the effect of an anchor tag in xhtml. So when you click on a link it will take you to that section/textblock e.g if you click on Admin, I would like to jump to the Admin Textblock.
How could i go about achieving this? I've attempted to do this but I am finding it difficult. If anyone could look at my code please and assist me it would be much appreciated.
Here is my code:
<StackPanel Grid.Row="1" Margin="0 2 0 2" Grid.ColumnSpan="2" Orientation="Horizontal">
<HyperlinkButton Content="{Binding MyiewModel.AdminCount, StringFormat='\{0\} x Admin'}" Foreground="Blue" />
<TextBlock Text=" - " />
<HyperlinkButton Content="{Binding MyViewModel.SalesCount, StringFormat='\{0\} x Sales'}" Foreground="Blue" />
<TextBlock Text=" - " />
<HyperlinkButton Content="{Binding MyViewModel.FinanceCount, StringFormat='\{0\} x Finance'}" TargetName="ContentFrame"
Tag="{Binding MyViewModel.FinanceCount}" NavigateUri="" Foreground="Blue" />
</StackPanel>
<Textblock Content="Admin " />
<Textblock Content="Sales" />
<Textblock Content="Finance" />
This post has been edited by MarmiteX1: 06 June 2012 - 08:17 AM

New Topic/Question
Reply



MultiQuote



|