title: WPF Showing / Hiding a control with triggers
body: <p>I'm new to WPF and I trying to create xaml logic to show / hide a control based on the value of the AllowMiscTitle on the ViewModel. The xaml consist of two fields a combobox of the standard tiles ("Mr", "Mrs", ..., "Other") when "Other" is selected I want the textbox to display.</p>
  
  <p>I've created the follow xaml:</p>
  
  <pre><code>                &lt;DockPanel Validation.Error="Validation_Error" HorizontalAlignment="Stretch"&gt;
                  &lt;ComboBox ItemsSource="{Binding Path=Titles, Mode=OneTime}" 
                        Text="{Binding Path=Title}"/&gt;
                  &lt;TextBox x:Name="TxtBxTitle" Margin="5,5" Visibility="Visible"&gt;
                      &lt;TextBox.Style&gt;
                          &lt;Style&gt;
                              &lt;Style.Triggers&gt;
                                  &lt;DataTrigger Binding="{Binding Path=AllowMiscTitle}" Value="false"&gt;
                                      &lt;Setter Property="TextBox.Visibility" Value="Hidden"/&gt;
                                  &lt;/DataTrigger&gt;
                              &lt;/Style.Triggers&gt;
                          &lt;/Style&gt;
                      &lt;/TextBox.Style&gt;
                  &lt;/TextBox&gt;
  
              &lt;/DockPanel&gt;
  </code></pre>