Esempio n. 1
0
 public static ListView <T> OnSelectedNavigate <T>(this ListView <T> view, Func <T, View> destination)
 {
     return(view.OnSelected(v => NavigationView.Navigate(view, destination?.Invoke(v))));
 }
Esempio n. 2
0
 public static T OnTapNavigate <T>(this T view, Func <View> destination) where T : View
 => view.OnTap((v) => NavigationView.Navigate(view, destination.Invoke()));
Esempio n. 3
0
 public static void Dismiss(this View view) => NavigationView.Pop(view);
Esempio n. 4
0
        //public static T AddGesture<T>(this T view, Gesture gesture) where T : View
        //{
        //	var gestures = (List<Gesture>)(view.Gestures ?? (view.Gestures = new List<Gesture>()));
        //	gestures.Add(gesture);
        //	view?.ViewHandler?.UpdateValue(Comet.Gesture.AddGestureProperty);
        //	return view;
        //}
        //public static T RemoveGesture<T>(this T view, Gesture gesture) where T : View
        //{
        //	var gestures = (List<Gesture>)view.Gestures;
        //	gestures.Remove(gesture);
        //	view?.ViewHandler?.UpdateValue(Comet.Gesture.RemoveGestureProperty);
        //	return view;
        //}

        //public static T OnTap<T>(this T view, Action<T> action) where T : View
        //	=> view.AddGesture(new TapGesture((g) => action?.Invoke(view)));

        //public static T OnTapNavigate<T>(this T view, Func<View> destination) where T : View
        //	=> view.OnTap((v) => NavigationView.Navigate(view, destination.Invoke()));

        public static void Navigate(this View view, View destination) => NavigationView.Navigate(view, destination);
Esempio n. 5
0
 public void SetPerformNavigate(NavigationView navView)
 => PerformNavigate = navView.PerformNavigate;
Esempio n. 6
0
 public void SetPerformPop(NavigationView navView)
 => PerformPop = navView.PerformPop;