[RS6] 18362 SDK:WMC1507警告 - 动作项目是什么? [英] [RS6]18362 SDK: WMC1507 warnings - what is the action item?

查看:84
本文介绍了[RS6] 18362 SDK:WMC1507警告 - 动作项目是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用新的18362 SDK编译我的应用时,我看到了这些警告:

I'm seeing these warnings when compiling my app with the new 18362 SDK:

1>   C:\ Path \ File.xaml(125,48):XamlCompiler警告WMC1507:命名元素"Title"也存在于根数据类型AppNs.ViewModelType'上。使用根数据类型中的字段。

1>  C:\Path\File.xaml(125,48): XamlCompiler warning WMC1507: Named element 'Title' also exists on root data type AppNs.ViewModelType'. Using field from root data type.

这是XAML的结果,如下所示:

This is a result of XAML like this:

<DataTemplate x:DataType="local:ViewModelType">
    <TextBlock Text="{x:Bind Title, Mode=OneWay}" Style="{StaticResource TitleTextBlockStyle}" />
</DataTemplate>

所以是的,我们绑定了一个名为Title的属性。试图说出的警告是什么,(除了重命名属性)是什么与它有关?

So yes, we're binding to a property named Title. What is the warning trying to say, and (aside from renaming the property) what is one to do with it?

谢谢。

推荐答案

你好,

不确定问题发生的原因,因为我们对您的项目一无所知。请尝试一些方法来缩小问题范围,以便我们找到它。首先,您是否尝试使用原始SDK(如build 1809)构建应用程序而不更改任何内容?
它会给出同样的错误吗?另一个问题是,是否存在包含Title属性的ViewModelType的参数数据类型?此外,如果您可以与我分享可以重现问题的样本,那会更好。这可能有助于直接看
a看问题。

Not sure about why the problem happens as we know nothing about your project. Please try some ways to narrow the problem so that we could locate it. First, have you tried to build the app with original SDK like build 1809 without changing anything? Does it give the same error? Another question is that is there a parameter data type for the ViewModelType that contains the Title property? Also, it would be better if you could share a sample with me that could reproduce the issue. This could help to take a look at the problem directly.

祝你好运,

Roy


这篇关于[RS6] 18362 SDK:WMC1507警告 - 动作项目是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆