/// <summary> /// on choose file button clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click(object sender, RoutedEventArgs e) { IFileChooser fileChooser = new FileChooser(); string path = string.Empty; if (fileChooser.getFile(out path) == true) { BitmapImage bitmap = this.seamUtilities.createBitmapFromFilePath(path); this.context.Height = bitmap.PixelHeight; this.context.Width = bitmap.PixelWidth; this.context.imageDataArray = this.seamUtilities.ImageToByte(bitmap, context); display(context.imageDataArray, (int)bitmap.Width, (int)bitmap.Height, context); } }