Share via


DebugSettings.XamlResourceReferenceFailed Event

Definition

Occurs when a reference to a XAML resource cannot be resolved.

// Register
event_token XamlResourceReferenceFailed(TypedEventHandler<DebugSettings, XamlResourceReferenceFailedEventArgs const&> const& handler) const;

// Revoke with event_token
void XamlResourceReferenceFailed(event_token const* cookie) const;

// Revoke with event_revoker
DebugSettings::XamlResourceReferenceFailed_revoker XamlResourceReferenceFailed(auto_revoke_t, TypedEventHandler<DebugSettings, XamlResourceReferenceFailedEventArgs const&> const& handler) const;
public event TypedEventHandler<DebugSettings,XamlResourceReferenceFailedEventArgs> XamlResourceReferenceFailed;
function onXamlResourceReferenceFailed(eventArgs) { /* Your code */ }
debugSettings.addEventListener("xamlresourcereferencefailed", onXamlResourceReferenceFailed);
debugSettings.removeEventListener("xamlresourcereferencefailed", onXamlResourceReferenceFailed);
- or -
debugSettings.onxamlresourcereferencefailed = onXamlResourceReferenceFailed;
Public Custom Event XamlResourceReferenceFailed As TypedEventHandler(Of DebugSettings, XamlResourceReferenceFailedEventArgs) 

Event Type

Remarks

IsXamlResourceReferenceTracingEnabled must be true in order for this event to be raised.

Error information is also logged to the native debug output when the event is raised, so attaching a XamlResourceReferenceFailed handler yourself is an advanced scenario for getting the raw message programmatically.

See XamlResourceReferenceFailedEventArgs.Message for more info about the error information that is provided.

Applies to

See also