usefulBee
usefulBee

Reputation: 9702

Base type page is specified in other parts

Even though XAML pages inherit automatically from Page, ReSharper grays out all inheritance from that Base class and comes up with the following message:

Base type page is specified in other parts

It suggests removing redundant super type references.

enter image description here

What is the interpretation of all this?

Upvotes: 9

Views: 1216

Answers (1)

Justin XL
Justin XL

Reputation: 39006

The code-behind MainPage class is a partial class. The other part is defined in XAML like this -

<Page x:Class="xxx.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      ...
</Page>

This markup is already saying the MainPage inherits from Page, so doing it again in the code-behind is redundant and that's why Resharper is marking it.

Upvotes: 10

Related Questions