【问题标题】:Fire UIElement Manipulation(Delta) in code behind在后面的代码中触发 UIElement Manipulation(Delta)
【发布时间】:2012-11-22 23:56:25
【问题描述】:

我正在构建一个 Windows 商店应用程序,我需要在后面的代码中触发 UIElement 的 Manipulation(Delta),但没有设法这样做。 这个想法是,用户可以从 TopAppBar 中选择一个 UIElement 并将其拖到 MainGrid 上(在那里制作了该 UIElement 的副本),然后在 MainGrid 上随意放置它。

工作原理: 在应用程序中,用户可以从 TopAppBar 拖动(使用操作)一个 UIElement(x),当它退出 TopAppBar 时,一个新的 UIElement(y) 将放置在页面的 MainGrid 上,并且 TopAppBar 关闭。新的 UIElement(y) 的位置使指针位于它的中心。

用户现在应该能够继续拖动(使用操作)UIElement,但因此我需要触发新 UIElement(y) 的操作。

我尝试订阅 ManipulationStarting 事件然后触发事件处理程序,但正如我所怀疑的那样,它失败了。

有什么想法吗?

【问题讨论】:

    标签: windows-store-apps microsoft-metro uielement


    【解决方案1】:

    有人在 msdn 支持论坛上回答了这个问题。 从后面的代码开始Manipulation似乎是不可能的。

    【讨论】:

      猜你喜欢
      • 2014-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-25
      • 1970-01-01
      • 2013-09-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多