title: WPF - UserControl inheritance
body: <p>I have problem with control inheritance in WPF. I created a  UserControl named BaseUserControl. I want for this control to be a base control for other WPF userControls. So I wrote another UserControl called FirstComponent. In next step I changed this code</p>
  
  <pre><code>FirstComponent : UserControl
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>FirstComponent : BaseControl
  </code></pre>
  
  <p>However during compilation I get this error </p>
  
  <pre><code>Partial declarations of 'controlinheritance.componenets.FirstComponent' must not specify different base classes 
  </code></pre>
  
  <p>What should I do to enable FirstComponent to derive from BaseControl?</p>
  
  <p>EDIT
  Thanks to abhishek answer I managed to inherit controls . Howerver I have another question. In base class I specified a property public Grid _MainGrid { get; set; }. Now I want in my derived class create an instance of this grid. So I used this code                                                                           
      
      
  
  Howerver I get an error  Property '_MainGrid' does not have a value. Line 8 Position 36.    </p>