title: ButtonBase.IsPressed is inaccessible in WPF
body: <p>I tried to changed size of button when I press button, and I used "Click" and "MouseLeave" events, but I don't want button's size change without pressing button. I was using ButtonBase.Ispressed to make this function, but I got an error says: ButtonBase.IsPressed can't be used, because the set accessor is inaccessible. Please help me to access to this set accessor. Thanks.
  Here is code:</p>
  
  <pre><code>   public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
      }
  
  
  
      private void SearchMedicationButton_OnClick(object sender, RoutedEventArgs e)
      {
          double _width = 436;
          double _height = 593;
  
          DoubleAnimation widthAnimation = new DoubleAnimation(_width,_width*0.8,new Duration(timeSpan:TimeSpan.FromSeconds(0.2)));
          DoubleAnimation heightAnimation = new DoubleAnimation(_height,_height*0.8,new Duration(timeSpan:TimeSpan.FromSeconds(0.2)));
  
          SearchMedicationButton.BeginAnimation(Button.WidthProperty, widthAnimation);
          SearchMedicationButton.BeginAnimation(Button.HeightProperty,heightAnimation);
      }
  
      private void SearchMedicationButton_OnMouseLeave(object sender, MouseEventArgs e)
      {
          double _width = 436;
          double _height = 593;
  
          DoubleAnimation widthAnimation = new DoubleAnimation(_width*0.8, _width , new Duration(timeSpan: TimeSpan.FromSeconds(0.2)));
          DoubleAnimation heightAnimation = new DoubleAnimation(_height*0.8, _height, new Duration(timeSpan: TimeSpan.FromSeconds(0.2)));
  
          SearchMedicationButton.BeginAnimation(Button.WidthProperty, widthAnimation);
          SearchMedicationButton.BeginAnimation(Button.HeightProperty, heightAnimation);
      }
  </code></pre>