/// <summary> /// /// </summary> /// <param name="ImagePath">Send ImagePath that need to Edit</param> /// <param name="callbackEventHandler">return imagepath after click save button</param> /// <returns>return ImagePath on callback(imagepath)</returns> public static async Task EditImage(string ImagePath, CallbackEventHandler callbackEventHandler) { var imgviewmodel = new Current(ImagePath); imgviewmodel.Callback += callbackEventHandler; var imgpage = new ImageEditorPage(ImagePath); imgpage.BindingContext = imgviewmodel; await App.Current.MainPage.Navigation.PushModalAsync(imgpage, true); }
/// <summary> /// /// </summary> /// <param name="ImagePath">Send ImagePath that need to Edit</param> /// <param name="callbackEventHandler">return imagepath after click save button</param> /// <returns>return ImagePath on callback(imagepath)</returns> public static async Task EditImage(ImageData data, CallbackEventHandler callbackEventHandler) { var imgviewmodel = new Current(data); imgviewmodel.Callback += callbackEventHandler; if (Device.RuntimePlatform == Device.Android) { var imgpage = new ImageEditorPage(string.Empty, data.Name, data.Description); imgpage.BindingContext = imgviewmodel; await App.Current.MainPage.Navigation.PushAsync(imgpage, true); } if (Device.RuntimePlatform == Device.iOS) { var imgpage = new ImageEditorPageForIOS(string.Empty, data.Name, data.Description); imgpage.BindingContext = imgviewmodel; await App.Current.MainPage.Navigation.PushAsync(imgpage, true); } // var imgpage = new ImageEditorPage(string.Empty,data.Name,data.Description); //imgpage.BindingContext = imgviewmodel; //await App.Current.MainPage.Navigation.PushAsync(imgpage, true); }