Question: I am developing window phone 7 application. I have a listbox in my application. I am doing dynamic binding with that listbox. The code of listbox is as follows:

```
<ListBox x:Name="FirstListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}" >
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Margin="0,0,0,17" Width="432">
                <TextBlock  Text="{Binding ID}" Width="440"></TextBlock>
                <TextBlock Text="{Binding IsCompany}" Width="440"></TextBlock>                                                                       
                <TextBlock Foreground="Red" Text="{Binding CompanyORIndividual}" Width="440"></TextBlock>                                                                            
                <TextBlock  Text="{Binding MicrosoftContact}" Width="440"></TextBlock>
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.Template>
        <ControlTemplate>
            <ScrollViewer HorizontalScrollBarVisibility="Visible">
                <ItemsPresenter />
            </ScrollViewer>
        </ControlTemplate>
        </ListBox.Template>
</ListBox>

```

This listbox is inside the pivot control. I want to add the link or click event one the following textblock.

```
<TextBlock Foreground="Red" Text="{Binding CompanyORIndividual}" Width="440"></TextBlock>

```

So that after clicking on the CompanyORIndividual textblock the user should be navigated to the other xaml page. How to do this. Can you please provide me the code with the event handler ? Can you please provide me nay code or link through which I can resolve the above issue ? If I am doing anything wrong then please guide me.If there is any better idea than my above question then please suggest it.

Answer: 
Here is what I did using VS2010.

1. Select the TextBlock control in the xaml window.
2. In the properties window, select Events.
3. Locate `MouseLeftButtonUp`, and double-click in the empty value text box, that will lead you to the xaml.cs code behind window, and will create a new method.
4. Place `this.Close();` in that method.
As workaround for a similar problem I faced in WP8 (Silverlight), I used a Button with transparent background and a Click event handler.

Now the problem with this is that, whenever the user touches/clicks on the button, a solid PhoneAccent color is set as the button's background (for the time period user holds it). 

To avoid this, you can set the button's `ClickMode="Pressed"` and in `Click` event set the background to transparent with `MyButton.Background = new SolidColorBrush(Colors.Transparent);`

Background is set to transparent whenever the Click event is fired with Button in *Pressed* state so the background color is set to Button when it is in that state. Not setting the `ClickMode="Pressed"` will not set Background color when Button is in pressed state.