基本类型页面在其他部分中指定

use*_*Bee 6 resharper uwp

即使XAML页面自动从Page继承,ReSharper也会从该Base类中查找所有继承,并提供以下消息:

Base type page is specified in other parts
Run Code Online (Sandbox Code Playgroud)

它建议删除冗余的超类型引用.

在此输入图像描述

这一切的解释是什么?

Jus*_* XL 6

代码隐藏MainPage类是一个partial类.另一部分在XAML中定义如下 -

<Page x:Class="xxx.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      ...
</Page>
Run Code Online (Sandbox Code Playgroud)

这个标记已经说MainPage继承了Page,所以在代码隐藏中再做一次是多余的,这就是Resharper标记它的原因.