title: How to change ToggleButton property IsEnabled from codebehind?
body: <p>I want to set property <code>IsEnabled</code> to <code>False</code> for some <code>ToggleButton</code> after user click on ConfirmButton. I would like to do it from codebehind in OnMarkTakenSeatsClick action. </p>
  
  <p>Some of my ToggleButtons look like that:</p>
  
  <pre><code>&lt;ToggleButton Style="{DynamicResource Seat}" x:Name="A10" Content="10" Click="OnSeatButtonClick" HorizontalAlignment="Left" Height="28.404" Margin="594.623,219.36,0,0" VerticalAlignment="Top" Width="29.145"/&gt;
  </code></pre>
  
  <p>I have list of objects (seats) that have ToggleButtons names that should be disabled. My Click action from ConfirmButton looks like that: </p>
  
  <pre><code>void OnMarkTakenSeatsClick(object sender, RoutedEventArgs e)
          {
              foreach (Seat addedSeat in seats)
              {
                  if (addedSeat.IsSelected)
                  { 
  
                  }
              }
          }
  </code></pre>
  
  <p>Any help here much appreciated!</p>