public static void Create(Weather w) { Application.Current.Dispatcher.Invoke(() => { var view = new WeatherView(w); view.FadeIn(); }); }
public WeatherView(Weather w) { InitializeComponent(); this.Temperature.Content = w.Temperature; this.Condition.Content = w.Condition; var u = "/Jarvis;component/Images/Weather/{0}.png".Template(w.Condition.RegexRemove(@"\s").ToLower()); this.Icon.Source = new BitmapImage(new Uri(u, UriKind.Relative)); }