Partial declarations must not specify different base classes

前端 未结 8 1455
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 22:14

Guys I am new to WPF .

I have a wpf page named StandardsDefault. In the code behind, StandardsDefault is inheriting Page, l

8条回答
  •  被撕碎了的回忆
    2020-12-05 23:12

    Bit of an odd one, and it hasn't been listed here yet... But since none of the above answers applied because I had both my xaml and cs files declared correctly, I did the following and it seemed to work:

    Go into the solution folder or click the show all files buton within Visual Studio and delete both the obj and bin folders, this causes Visual Studio to regenerate all of its files for the project.

    Your project should now build/run correctly.

    Hope that helps someone - or perhaps myself in the future.

    Edit: This fix usually works if you get this problem after changing the page type from for example a ContentPage to a CarouselPage.

提交回复
热议问题