title: Displaying Content only when ListViewItem is Selected
body: <p>I have a <code>ListBox</code> when one of the <code>ListBoxItems</code> are selected I want to change the visibility of the button "View" and display it. Meaning that the default state is Hidden.</p>
  
  <p>Is this possible and if so, do I solve this with a trigger in XAML or in code behind?</p>
  
  <p><strong>XAML Piece</strong></p>
  
  <pre><code>&lt;ListBox Background="Transparent" 
        ItemContainerStyle="{StaticResource listBoxTemplate}" BorderThickness="0"&gt;
      &lt;ListBox.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;StackPanel Orientation="Vertical" VerticalAlignment="Center" /&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ListBox.ItemsPanel&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Grid Background="Beige" Margin="10 10 10 10" 
                      HorizontalAlignment="Center" Width="500" Height="100"
                      VerticalAlignment="Stretch"&gt;
                  &lt;Grid.RowDefinitions&gt;
                      &lt;RowDefinition Name="TopRow" Height="50" /&gt;
                      &lt;RowDefinition Name="BottomRow" Height="*" /&gt;
                  &lt;/Grid.RowDefinitions&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Name="LeftSideMenu" Width="*"/&gt;
                      &lt;ColumnDefinition Name="Middle" Width="*"/&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
                  &lt;Label Grid.Column="0" Grid.Row="0" Content="{Binding name}" /&gt;
  
                  &lt;Button Grid.Column="1" VerticalAlignment="Center" 
                      Grid.RowSpan="2" Name="view" Click="viewClicked_Click"
                      Grid.Row="0"&gt;View&lt;/Button&gt;
  
                  &lt;Label Grid.Column="0" Grid.Row="1" 
                      Content="{Binding description}" /&gt;
              &lt;/Grid&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>