private async void Laplace2PageMenuFlyoutItem_Click(object sender, RoutedEventArgs e) { WriteableOutputImage = WriteableBitmapCovolute.Convolute(WriteableOutputImage, Laplace2); AddToUndo(WriteableOutputImage.Clone()); await UpdateOutputImage(); }
private async void CustomPageMenuFlyoutItem_Click(object sender, RoutedEventArgs e) { CustomConvolutionFilterDialog dialog = new CustomConvolutionFilterDialog(); ContentDialogResult result = await dialog.ShowAsync(); if (result == ContentDialogResult.Secondary) { WriteableOutputImage = WriteableBitmapCovolute.Convolute(WriteableOutputImage, await dialog.GetKernel()); AddToUndo(WriteableOutputImage.Clone()); await UpdateOutputImage(); } else { // The user clicked the CLoseButton, pressed ESC, Gamepad B, or the system back button. // Do nothing. } }
private async void GaussianBlurPageMenuFlyoutItem_Click(object sender, RoutedEventArgs e) { GaussianBlurDialog dialog = new GaussianBlurDialog(); ContentDialogResult result = await dialog.ShowAsync(); if (result == ContentDialogResult.Secondary) { var kernel = GaussianBlureHelper.CalculateKernel(dialog.SValue, dialog.SDValue); WriteableOutputImage = WriteableBitmapCovolute.Convolute(WriteableOutputImage, kernel); AddToUndo(WriteableOutputImage.Clone()); await UpdateOutputImage(); } else { // The user clicked the CLoseButton, pressed ESC, Gamepad B, or the system back button. // Do nothing. } }