locked
Wrong way of inheritance? RRS feed

  • Question

  • Hi to all,

    In my app I have a lot of times the compile warning "WLP.CboSelStatusVorgang.InitializeComponent()' hides inherited member 'WLP.CboSel.InitializeComponent()'. Use the new keyword if hiding was intended."

    So I have parent classes (like above CboSel) which do have a Xaml representation and need to. (Of course it does not contain a root element, as this would crash, but it contains for example a size.) Consequently there is an InitializeComponent method in this parent class.

    My derived class of course also has an InitializeComponent, leading me to above mentioned error - or let's say warning. What is wrong? I'm not sure how others work. I'm afraid this could be a cause for my designer loading errors?

    Tuesday, June 15, 2010 9:00 AM

Answers

  • Inheritance of XAML-generated files is not supported. That message is a warning, not an error, but it will probably not be the only problem you run into as a result of attempting to do this.

     You should be able to find another way to solve your original problem.

    Tuesday, June 15, 2010 9:17 AM