title: How do i enable/disable a TextBox and a label based on Check Box in WPF?
body: <p>How do I enable or disable a <code>Label</code> and <code>textbox</code> based on <code>checkbox</code> input in <strong>WPF</strong>??</p>
  
  <p><strong>CheckBox</strong></p>
  
  <pre><code>&lt;CheckBox Style="{StaticResource CheckBoxStyle1}"  Foreground="#FFF9F3F3" HorizontalAlignment="Left" Margin="32.844,-5.293,0,0" Width="216" Content="Sim Needs Passwprd?" Grid.Column="1" Grid.Row="2" Height="18.043" VerticalAlignment="Top" FontSize="14" Background="#FFF4F4F4"/&gt;
  </code></pre>
  
  <p><strong>TextBox and Label</strong></p>
  
  <pre><code>&lt;Label  Style="{StaticResource LabelTitle}" Content="Sim User Name" Margin="14.439,17.192,-83.497,15"  d:IsStaticText="True" Background="#00D32626" x:Name="Label_SimUName" d:LayoutOverrides="Width, Height" Grid.Row="2" /&gt;
  &lt;Border Style="{StaticResource BorderTextBox}" Grid.Column="1" Grid.Row="2" Margin="29.844,15.885,0,16.307" d:LayoutOverrides="Height" HorizontalAlignment="Left" Width="288"&gt;
      &lt;TextBox Style="{StaticResource ValueTextBox_Sim}" HorizontalAlignment="Stretch" Margin="0,0,0,0"  Grid.Column="1" Text="TextBox" x:Name="TextBox_SimUName" ClipToBounds="False" VerticalAlignment="Stretch" Width="286"/&gt;
  &lt;/Border&gt;
  
  &lt;Label  Style="{StaticResource LabelTitle}" Content="Sim Password" Margin="14.439,-4,-83.497,0"  d:IsStaticText="True" Background="#00D32626" x:Name="Label_SimPassword" d:LayoutOverrides="Width, Height" Grid.Row="3" VerticalAlignment="Top" /&gt;
  &lt;Border Style="{StaticResource BorderTextBox}" Grid.Column="1" Grid.Row="3" Margin="29.844,-5.307,0,0" d:LayoutOverrides="Height" HorizontalAlignment="Left" Width="288" VerticalAlignment="Top"&gt;
      &lt;TextBox Style="{StaticResource ValueTextBox_Sim}" HorizontalAlignment="Stretch" Margin="0,0,0,0"  Grid.Column="1" Text="TextBox" x:Name="TextBox_SimPassword" ClipToBounds="False" VerticalAlignment="Stretch" Width="288"/&gt;
  &lt;/Border&gt;
  </code></pre>
  
  <p>Can someone please help me on this?</p>