Thanks for the answer, i'm new to silverlight so could you help me out to get the hiddenID value? this is my listbox with the datatemplate The listbox is loaded with many different items, the header=hyperlink does not have unique contents. What i want is to pass the current HiddenID that correspons to the hyperlink Ex: hiddenID = 34 Hyperlink = "Recent events" Content = "short description" when i press "Recent events" and trigger the hyperlinkbutton event i want to be able to get the value from hiddenID
<ListBox x:Name="ListboxNews" ItemTemplate="{StaticResource NewsTemplate}" ItemsSource="{Binding _News}" Margin="8,38,8,8" Opacity="1" BorderThickness="0" Background="White" />
<DataTemplate x:Key="NewsTemplate">
<Grid Background="White" HorizontalAlignment="Left" Height="59" VerticalAlignment="Top" Width="265">
<HyperlinkButton x:Name="NewsHyperLink" Content="{Binding Header}" FontSize="18.667" FontWeight="Bold" FontFamily="/StartPage;component/Fonts/Fonts.zip#Calibri" Click="HyperlinkButton_Click" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Margin="10,0,0,0"/>
<TextBlock x:Name="Content" Text="{Binding Content}" TextWrapping="Wrap" Width="265" FontFamily="/StartPage;component/Fonts/Fonts.zip#Calibri" FontSize="16" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="12,23,0,0" />
<TextBlock x:Name="HiddenID" Text="{Binding NewsID}" Width="20" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" FontSize="16" HorizontalAlignment="Left" Margin="-2,0,0,0" />
</Grid>
</DataTemplate>