PhoneLine.LineChanged 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.
// Register
event_token LineChanged(TypedEventHandler<PhoneLine, IInspectable const&> const& handler) const;
// Revoke with event_token
void LineChanged(event_token const* cookie) const;
// Revoke with event_revoker
PhoneLine::LineChanged_revoker LineChanged(auto_revoke_t, TypedEventHandler<PhoneLine, IInspectable const&> const& handler) const;
public event TypedEventHandler<PhoneLine,object> LineChanged;
function onLineChanged(eventArgs) { /* Your code */ }
phoneLine.addEventListener("linechanged", onLineChanged);
phoneLine.removeEventListener("linechanged", onLineChanged);
- or -
phoneLine.onlinechanged = onLineChanged;
Public Custom Event LineChanged As TypedEventHandler(Of PhoneLine, Object)
Event Type
TypedEventHandler<PhoneLine,IInspectable>
Windows requirements
App capabilities |
phoneCallHistory
phoneCallHistorySystem
|
Remarks
The following example demonstrates how to monitor for and update the network state.
private async void MonitorLineChanges(Guid lineId)
{
// Get the PhoneLine instance
PhoneLine line = await PhoneLine.FromIdAsync(lineId);
PhoneNetworkState updatedNetworkState;
string updatedNetworkName;
line.LineChanged += (o, args) =>
{
updatedNetworkState = line.NetworkState;
updatedNetworkName = line.NetworkName;
};
}