private static void OnImageBrushMultiResSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ImageBrush ib = (ImageBrush)d; if (e.NewValue == null) { ImageLoader.ProcessImageBrush(ib, null); } else { string @string = e.NewValue.ToString(); string str = !DesignerProperties.GetIsInDesignMode((DependencyObject)ib) ? MultiResolutionHelper.Instance.AppendResolutionSuffix(@string, true, "") : MultiResolutionHelper.Instance.AppendResolutionSuffix(@string, true, "-WVGA"); ImageLoader.ProcessImageBrush(ib, str); } }
private static void OnImageBrushMultiResSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ImageBrush imageBrush = (ImageBrush)d; if (e.NewValue == null) { ImageLoader.ProcessImageBrush(imageBrush, null); return; } string text = e.NewValue.ToString(); if (DesignerProperties.GetIsInDesignMode(imageBrush)) { text = MultiResolutionHelper.Instance.AppendResolutionSuffix(text, true, "-WVGA"); } else { text = MultiResolutionHelper.Instance.AppendResolutionSuffix(text, true, ""); } ImageLoader.ProcessImageBrush(imageBrush, text); }
private static void OnImageBrushSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ImageLoader.ProcessImageBrush((ImageBrush)d, e.NewValue); }