0

I was playing around trying to design a button and I came up with using a Border with a Button on it. Then I changed my MyClass to derive from Border. Border is a sealed class so the compiler flagged an error. So I removed the ": Border" from the class definition. Now however I still get a

Error CS0509 'NumberedButton': cannot derive from sealed type 'Border'

As it's a partial class I wondered where else in the bowels of the project there is a memory of this? I've searched all the textfiles (I think) and come up empty-handed. See the snip on Imgur

Image

Aslam
  • 9,204
  • 4
  • 35
  • 51
Paulustrious
  • 609
  • 1
  • 11
  • 17
  • 1
    I hate it so much when things like this happen!, I guess you've already tried all the usual tricks like reopening VS and doing a clean/rebuild? – Fredy Treboux Mar 30 '17 at 21:46
  • 1
    The .g.cs may use boarder that it say you cant derive from it.Try clean it – lindexi Mar 31 '17 at 03:27

1 Answers1

0

The problem, as usual, was newbie stupidity. The root object of the Xaml was still Border, whereas the code behind Class was NumberedButton.

I leave this here for others who may fall into the same trap.

Paulustrious
  • 609
  • 1
  • 11
  • 17