public void mediaClick4() { ImageSource rawImage = this.mediaSource4; var titleHeight = SystemParameters.WindowCaptionHeight + SystemParameters.ResizeFrameHorizontalBorderHeight; var verticalBorderWidth = SystemParameters.ResizeFrameVerticalBorderWidth; PictureViewer viewer = new PictureViewer(); viewer.image.Source = rawImage; viewer.Width = rawImage.Width + (verticalBorderWidth * 2); viewer.Height = rawImage.Height + titleHeight + SystemParameters.ResizeFrameHorizontalBorderHeight; viewer.Show(); }
public void mediaClick() { if (mediaIsNotImage) { Process.Start(rawMediaUri.OriginalString); } else { ImageSource rawImage = this.mediaSource; var titleHeight = SystemParameters.WindowCaptionHeight + SystemParameters.ResizeFrameHorizontalBorderHeight; var verticalBorderWidth = SystemParameters.ResizeFrameVerticalBorderWidth; PictureViewer viewer = new PictureViewer(); viewer.image.Source = rawImage; viewer.Width = rawImage.Width + (verticalBorderWidth * 2); viewer.Height = rawImage.Height + titleHeight + SystemParameters.ResizeFrameHorizontalBorderHeight; viewer.Show(); } }