【问题标题】:Can't use Flyout in the Button in WinRT?不能在 WinRT 的按钮中使用 Flyout?
【发布时间】:2014-04-09 13:24:47
【问题描述】:

在下面的代码 sn-p 中使用按钮中的 Flyout 时,

  <Button HorizontalAlignment="Center" Content="Open Flyout">
     <Button.Flyout>
        <Flyout>
           //some code
         </Flyout>
      </Button.Flyout>
   </Button>

在构建应用程序时会引发以下错误:

  1. XML 命名空间中的未知类型“Flyout”
    http://schemas.microsoft.com/winfx/2006/xaml/presentation'

  2. 元素“按钮”上的未知成员“Flyout”

注意:以前(一个月前)运行良好

Vs2012 - Windows8.1

我错过了什么?任何帮助将不胜感激。

谢谢, Joy Oyiess Rex K

【问题讨论】:

  • 当我创建一个空白应用程序并添加 时,效果很好。
  • @MatDev8 如前所述,它以前工作得很好,但现在不行。是的,我已经检查了您在之前的评论中提到的代码 sn-p,但这对我也不起作用。你可以检查以下场景(Vs2012 with Windows8.1)

标签: xaml windows-runtime microsoft-metro winrt-xaml


【解决方案1】:

Flyout 是 Windows 8.1 中的新控件。您需要 Visual Studio 2013 来开发适用于 Windows 8.1 的应用程序。

【讨论】:

  • 是这样吗? VS版本之间有这样的问题吗?@cremor
  • @JOYOYIESSREX 官方要求 VS 2012 以 8.0 为目标,VS 2013 以 8.1 为目标。也许有一些技巧可以让它正常工作,但我不知道。
猜你喜欢
  • 2016-08-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-08-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多