Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Base type page is specified in other parts

Tags:

resharper

uwp

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?

like image 205
usefulBee Avatar asked May 30 '17 18:05

usefulBee


1 Answers

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.

like image 178
Justin XL Avatar answered Oct 23 '22 08:10

Justin XL