DebugSettings.XamlResourceReferenceFailed 事件

定义

无法解析对 XAML 资源的引用时发生。

// 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) 

事件类型

注解

IsXamlResourceReferenceTracingEnabled 必须 true 引发此事件。

引发事件时,错误信息也会记录到本机调试输出中,因此,自行附加 XamlResourceReferenceFailed 处理程序是一种以编程方式获取原始消息的高级方案。

有关提供的错误信息的详细信息,请参阅 XamlResourceReferenceFailedEventArgs.Message

适用于

另请参阅