public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { try { return(FileHandler.getBitmapImage((string)value, FileHandler.DEFAULT_BACKGROUND_IMAGE)); } catch (Exception) { return(null); } }
private void UpdateBackgroundImage() { if (App.metroSettings.BackgroundUri != null) { pivot.Background = new ImageBrush { Opacity = App.metroSettings.BackgroundOpacity, Stretch = Stretch.None, AlignmentX = System.Windows.Media.AlignmentX.Center, AlignmentY = System.Windows.Media.AlignmentY.Top, ImageSource = FileHandler.getBitmapImage(App.metroSettings.BackgroundUri, FileHandler.DEFAULT_BACKGROUND_IMAGE) }; } else { pivot.Background = null; } }