private static void OnUriSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var image = d as SmartImage; if (Current == null) { return; } if (image == null) { throw new ArgumentNullException("image"); } var url = e.NewValue as string; ImageSourceProxy proxy = null; if (Current.proxyList.ContainsKey(url)) { proxy = Current.proxyList[url]; } else { proxy = new ImageSourceProxy(); proxy.SourceUrl = url; Current.proxyList[url] = proxy; } proxy.AddSmartImage(image); }
private static void OnUriSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var image = d as SmartImage; if (Current == null) return; if (image == null) throw new ArgumentNullException("image"); var url = e.NewValue as string; ImageSourceProxy proxy = null; if (Current.proxyList.ContainsKey(url)) proxy = Current.proxyList[url]; else { proxy = new ImageSourceProxy(); proxy.SourceUrl = url; Current.proxyList[url] = proxy; } proxy.AddSmartImage(image); }