VisualDiagnostics.GetXamlSourceInfo(Object) 方法

定義

傳回 XamlSourceInfo 的執行個體,其包含指定物件之 XAML 來源文件的相關資訊。Returns an instance of XamlSourceInfo that contains information about the XAML source document for the specified object.

public:
 static System::Windows::Diagnostics::XamlSourceInfo ^ GetXamlSourceInfo(System::Object ^ obj);
public static System.Windows.Diagnostics.XamlSourceInfo GetXamlSourceInfo (object obj);
static member GetXamlSourceInfo : obj -> System.Windows.Diagnostics.XamlSourceInfo
Public Shared Function GetXamlSourceInfo (obj As Object) As XamlSourceInfo

參數

obj
Object

用於尋找 XAML 來源的物件。The object for which to find the XAML source.

傳回

XamlSourceInfo

XAML 來源文件的相關資 (如有提供);否則為 nullInformation about the XAML source document if available; otherwise, null.

備註

只有在 ENABLE_XAML_DIAGNOSTICS_SOURCE_INFO 的環境變數設定為0或以外的任何專案時,才可以使用只有 Debug 元件的來源資訊 falseSource info is available only for Debug assemblies and only if the ENABLE_XAML_DIAGNOSTICS_SOURCE_INFO environment variable is set to anything other than 0 or false.

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

適用於