public WorldWeather() { InitializeComponent(); OpenWeatherMapService = new OpenWeatherMapService(); DataContext = this; OpenWeatherMapService.GetWeatherAsync(); }
public WorldWeather() { InitializeComponent(); OpenWeatherMapService = ViewModelSource.Create(() => new OpenWeatherMapService()); DataContext = this; OpenWeatherMapService.GetWeatherAsync(); }
void lbUnitType_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e) { OpenWeatherMapService.SetCurrentTemperatureType((TemperatureScale)e.NewValue); }