1

If i have an image with an Hold event and what to do something when you are finished holding on the image. First you Hold and it sets visibility on some things then when you stop holding on the image it should show what it was hidning in the first place.

Now i have only done this so far:

<Image x:Name="showMe" Source="/Assets/ViewPass.png" Width="48" Height="48" Margin="360,11,22,11" Hold="passShow_Hold_1"/>

and then just some code to show and hide some boxes:

private void passShow_Hold_1(object sender, System.Windows.Input.GestureEventArgs e)
{
  losenord.Visibility = Visibility.Collapsed;
  visalosenord.Visibility = Visibility.Visible;
}

Can i make a completed event for the hold gesture to make this work.

4

1 回答 1

0

您可以在 onHold 方法中存储一些状态。并在 MouseLeftButtonUp.

在您需要检查之后,如果 onHold 事件处理程序已执行,那么您可以恢复更改。

于 2013-06-09T10:54:28.613 回答