弹出操作WP8.1 C#

Popup Manipulation WP8.1 C#

我目前正在尝试使用操作增量 class 来操作图像的弹出窗口。 因此我不知道如何调用 manipulation delta 事件。

我在网上找到了解决方案,但我无法实施。

https://social.msdn.microsoft.com/forums/windowsapps/en-us/0c24865a-0d87-49dd-824b-cec250a4fb82/manipulation-delta-on-windows-8-popup-c

manipulationdelta for popup window - XAML Windows 8

我不知道我是如何实现这个网格的,所以调用了我的操作增量事件。我试图通过 child 将它包含到弹出窗口中,它在前面。 (通过更改颜色检查)但它不响应任何操作事件。

我的代码如下所示。 ctrlGrid 是我用(ctrlgrid.ManipulationDelta 和 imagepopup.ManipulationDelta 尝试过)

调用操作增量事件的那个

感谢您对此提供的任何帮助。

弗洛

 Grid popUpGrid = new Grid
        {
            MinHeight = imagePopup.ActualHeight,
            MinWidth = imagePopup.ActualWidth,
            Background = new SolidColorBrush(Colors.Green),
        };
       imagePopup.Child = popUpGrid;


       Image popUpImage = new Image           
            {
                Source = ((Image)sender).Source,
                //MaxHeight = popUpGrid.MinHeight,
            };
       popUpGrid.Children.Add(popUpImage); 

Grid ctrlGrid = new Grid
       {
           MinHeight=imagePopup.ActualHeight,
           MinWidth=imagePopup.ActualWidth,
           Background = new SolidColorBrush(Colors.Transparent),
           IsDoubleTapEnabled=true,
           ManipulationMode=ManipulationModes.All 

       };
       popUpGrid.Children.Add(ctrlGrid); 

在同事的帮助下,我得以解决。 我使用了错误的 deltamanipulation 处理程序。我使用了弹出窗口本身的处理程序,而 ctrlGrid_Deltamanipulation 处理程序是正确的。

弗洛