PowerGridForecast.ForecastUpdated Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Event to notify subscribers when a new forecast payload is ready. It's expected that, when your app receives this notification, you'll call GetForecast.
// Register
static event_token ForecastUpdated(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void ForecastUpdated(event_token const* cookie) const;
// Revoke with event_revoker
static PowerGridForecast::ForecastUpdated_revoker ForecastUpdated(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> ForecastUpdated;
function onForecastUpdated(eventArgs) { /* Your code */ }
Windows.Devices.Power.PowerGridForecast.addEventListener("forecastupdated", onForecastUpdated);
Windows.Devices.Power.PowerGridForecast.removeEventListener("forecastupdated", onForecastUpdated);
- or -
Windows.Devices.Power.PowerGridForecast.onforecastupdated = onForecastUpdated;
Public Shared Custom Event ForecastUpdated As EventHandler(Of Object)