title: WPF use override Property in inherit class in XAML
body: <p>I have a little problem and can´t find any solution. Maybe it is an issue in Visual Studio.</p>
  
  <p>I have created a new class that is inherited from Image. I then override the Source property.</p>
  
  <pre><code>class GifImage : Image
  {
       public new ImageSource Source
       {
           get { return base.Source; } 
           set
           {
               MesssageBox("new source property");
               base.Source = value;
           } 
       }
  }
  </code></pre>
  
  <p>If I set Source in code</p>
  
  <pre><code>GifImage gifImage = new GifImage();
  gifImage.Source = gifimage2;
  </code></pre>
  
  <p>Then the Source will be correctly set to GifImage and the MessageBox will be shown.</p>
  
  <p>But if I set Source in the Xaml-Code:</p>
  
  <pre><code>&lt;my1:GifImage Stretch="Uniform" Source="/WpfApplication1;component/Images/Preloader.gif" /&gt;
  </code></pre>
  
  <p>Then the Source property of the Image will be set and the MessageBox won´t be shown.</p>
  
  <p>My idea was to set the System.ComponentModel.Browsable-Attribute, thinking that maybe the property in the inherit GifImage class is not visible in Visual Studio and it is using the source property of the parent class.</p>
  
  <pre><code>[Browsable(true)]
  public new ImageSource Source
  </code></pre>
  
  <p>But this is still not working.</p>
  
  <p>Has somebody had the same problem or/and the solution for this?</p>