Пример #1
0
        private async Task ExecuteUpdatePhotoCommand()
        {
            string[] updateOptions = { UIConstants.TakePhoto, UIConstants.ChooseFromGallery };
            string   chosenOption  = await RootPage.DisplayActionSheet(UIConstants.UpdatePhoto, "Cancel", null, updateOptions);

            if (!string.IsNullOrEmpty(chosenOption))
            {
                if (chosenOption.Equals(UIConstants.TakePhoto))
                {
                    await TakePhoto();
                }
                else if (chosenOption.Equals(UIConstants.ChooseFromGallery))
                {
                    await ChoosePhoto();
                }
            }
        }