Beispiel #1
0
        private async void CropButton_Click(object sender, RoutedEventArgs e)
        {
            Popup p     = new Popup();
            Image image = new Image();

            image.Source = await CropImageControl.GetCropImageSource();

            p.Child  = image;
            p.IsOpen = true;
        }
        private async void btn_OK_Tapped(object sender, TappedRoutedEventArgs e)
        {
            WriteableBitmap wb = (WriteableBitmap)await CropImageControl.GetCropImageSource();

            StorageFile file = await WriteToFile(wb);

            if (PictureCrop_HandlerEvent != null)
            {
                PictureCrop_HandlerEvent(file);
            }
            //Popup p = new Popup();
            //Image image = new Image();
            //image.Source = await CropImageControl.GetCropImageSource();
            //p.Child = image;
            //p.IsOpen = true;

            if (popup.IsOpen)
            {
                popup.IsOpen = false;
            }

            e.Handled = true;
        }