2016-08-26 43 views

回答

0

我已經設法使用自定義渲染器。

[assembly: ExportRenderer(typeof(BaseMasterDetailPage), typeof(MyMasterDetailPageRenderer))] 

namespace Driver.Droid.Renderers 
{ 
    public class MyMasterDetailPageRenderer : MasterDetailPageRenderer 
    { 
     public override bool OnTouchEvent(Android.Views.MotionEvent e) 
     { 
      if (e.Action == Android.Views.MotionEventActions.Up) 
       new Task(CloseDrawers).Start(TaskScheduler.FromCurrentSynchronizationContext()); 

      return base.OnTouchEvent(e); 
     } 
    } 
} 
相關問題