title: How to hide labels at runtime
body: <p>I have data template which has some labels,what i want to do is to hide some of the labels at runtime depending upon the configuration settings.</p>
  
  <p>I have binded the visibility of the labels to a property but the lables are not hidden even when the property says False.</p>
  
  <p>Below is my xaml</p>
  
  <pre><code>&lt;Label x:Name="lblWashingMachineName" Content="{x:Static Resources:Translations.MainWindow_WashingMachineName}"
                              Grid.Row="6" Grid.Column="2" Style="{StaticResource styleLabelBig}" Visibility="{Binding Path=ShowLabels}"&gt;&lt;/Label&gt;
  </code></pre>
  
  <p>Property</p>
  
  <pre><code>    public bool ShowLabels
      {
          get
          {
              return _showLabels;
          }
          private set
          {
              _showLabels = value;
              OnPropertyChanged("ShowLabels");
          }
      }
  </code></pre>
  
  <p>Setting the property in constructor</p>
  
  <pre><code>    public DisplayScopeRecord()
      {
          ShowLabels = !(AppContext.Instance.DicomizerEnabled);
      }
  </code></pre>