private void DisplayScreenshot(TibiaScreenshot tibiaScreenshot) { _selectedScreenshot = tibiaScreenshot; var image = new BitmapImage(); image.BeginInit(); image.CacheOption = BitmapCacheOption.OnLoad; image.UriSource = new Uri(_selectedScreenshot.Path); image.EndInit(); ScreenshotImage.Source = image; var dateTimeFormat = CultureInfo.CurrentUICulture.DateTimeFormat.FullDateTimePattern; DescriptionLabel.Content = $"{_selectedScreenshot.Character} - {_selectedScreenshot.TypeToDisplayString()} - {_selectedScreenshot.Timestamp.ToString(dateTimeFormat)}"; }
private void ClearSelectedScreenshot() { _selectedScreenshot = null; ScreenshotImage.Source = null; DescriptionLabel.Content = ""; }