【发布时间】:2019-01-28 17:16:32
【问题描述】:
Visual Studio 似乎无法识别某些对进行注视跟踪至关重要的属性。在我的 XAML 页面(我有一个 UWP 应用程序)上,我有以下代码。
<Page
x:Class="App14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App14"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:g="using:Microsoft.Toolkit.Uwp.Input.GazeInteraction"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
g:GazeInput.Interaction="Enabled"
g:GazeInput.IsCursorVisible="True"
g:GazeInput.CursorRadius="20"
g:GazeInput.IsSwitchEnabled="False">
</Page>
但是,Visual Studio 无法识别属性 g:GazeInput.Interaction="Enabled"、g:GazeInput.IsCursorVisible="True"、g:GazeInput.CursorRadius="20" 和 g:GazeInput.IsSwitchEnabled="False">
这些属性带有绿色下划线,表示在Microsoft.Toolkit.UWP.Input.GazeInteraction.GazeInput.*insert property here* 中找不到这些属性。
我已经安装了来自 Microsoft 的用于 Gaze 的 NuGet 包,我的 Windows 10 版本是 1803(内部版本 17134)。
有谁知道为什么会发生这种情况以及我该如何解决这个问题?
【问题讨论】:
-
它对我来说很好用。你能澄清一下你的项目目标和最低版本是什么吗? (检查项目属性)。我认为最低版本也需要至少为 17134。
-
你好斯特凡!感谢您的答复!目标与最低版本相同,因此都在 17134 上。
-
它是否使用从头开始创建的新的空项目进行复制?你能分享一个repro项目吗?询问是因为我无法在此处重现错误。
-
是的,即使我打开一个新项目,它也会被复制。这是项目的链接(我上传到 mediafire)mediafire.com/file/dfju95s8eqy18u3/App14.zip/file
-
抱歉,我使用的是该应用程序的早期版本。这是更新的:mediafire.com/file/185fa2ui5au3v33/App14.zip/file 再次感谢您对此进行调查!
标签: c# properties uwp nuget