Xamarin.Ios 实现imge 的点击事件

来源:互联网 发布:embed js 播放 编辑:程序博客网 时间:2024/05/16 15:42


public override void TouchesBegan (NSSet touches, UIEvent evt)
  {
   base.TouchesBegan (touches, evt);

   UITouch touch = touches.AnyObject as UITouch;
   if (this.imageView.Frame.Contains (touch.LocationInView(this.ContentView)) )
   {
    var model=this.DataContext as ProductCellModel;
    model.GoAddTimerViewModelCommand.Execute();
   }
  }

1 0
原创粉丝点击