XamlXmlReader 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 XamlXmlReader 類別的新執行個體。
多載
XamlXmlReader(Stream)
根據串流初始化該類別的新 XamlXmlReader 實例。
public:
XamlXmlReader(System::IO::Stream ^ stream);
public XamlXmlReader(System.IO.Stream stream);
new System.Xaml.XamlXmlReader : System.IO.Stream -> System.Xaml.XamlXmlReader
Public Sub New (stream As Stream)
參數
- stream
- Stream
初始串流要載入讀取器。
例外狀況
stream 是 null。
適用於
XamlXmlReader(XmlReader, XamlSchemaContext, XamlXmlReaderSettings)
利用提供的 XamlXmlReader、 schema context 和 reader 設定初始化該類別的新XmlReader實例。
public:
XamlXmlReader(System::Xml::XmlReader ^ xmlReader, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.Xml.XmlReader xmlReader, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.Xml.XmlReader * System.Xaml.XamlSchemaContext * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (xmlReader As XmlReader, schemaContext As XamlSchemaContext, settings As XamlXmlReaderSettings)
參數
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
- settings
- XamlXmlReaderSettings
特定的 XAML 讀取器設定。
例外狀況
xmlReader 或 schemaContext 為 null。
備註
使用此建構子初始化會嘗試將部分設定xmlReader與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(String, XamlSchemaContext, XamlXmlReaderSettings)
根據檔案名稱初始化類別的新實例 XamlXmlReader ,載入預設的 XML 讀取器,並使用提供的 XAML 結構上下文及 XAML 專用讀取器設定。
public:
XamlXmlReader(System::String ^ fileName, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(string fileName, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : string * System.Xaml.XamlSchemaContext * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (fileName As String, schemaContext As XamlSchemaContext, settings As XamlXmlReaderSettings)
參數
- fileName
- String
載入的 XML 檔案名稱。
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
備註
使用此建構子初始化會嘗試將預設讀取器中的部分設定與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(Stream, XamlSchemaContext, XamlXmlReaderSettings)
基於串流初始化類別的新實例 XamlXmlReader ,並附有提供的 XAML 架構上下文及 XAML 專屬設定。
public:
XamlXmlReader(System::IO::Stream ^ stream, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.IO.Stream stream, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.IO.Stream * System.Xaml.XamlSchemaContext * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (stream As Stream, schemaContext As XamlSchemaContext, settings As XamlXmlReaderSettings)
參數
- stream
- Stream
初始串流要載入讀取器。
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
stream 或 schemaContext 為 null。
備註
使用此建構子初始化會嘗試將預設讀取器中的部分設定與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(XmlReader, XamlXmlReaderSettings)
使用提供的 XamlXmlReader 和 reader 設定初始化該類別的新實例XmlReader。
public:
XamlXmlReader(System::Xml::XmlReader ^ xmlReader, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.Xml.XmlReader xmlReader, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.Xml.XmlReader * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (xmlReader As XmlReader, settings As XamlXmlReaderSettings)
參數
- settings
- XamlXmlReaderSettings
特定的 XAML 讀取器設定。
例外狀況
xmlReader 或 settings 為 null。
備註
使用此建構子初始化會嘗試將部分設定xmlReader與 XAML 專屬設定合併。settings 使用此建構子初始化也會設定預設讀取器設定。 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(XmlReader, XamlSchemaContext)
利用提供的 XamlXmlReader 和 schema 上下文初始化該類別的新實例XmlReader。
public:
XamlXmlReader(System::Xml::XmlReader ^ xmlReader, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlXmlReader(System.Xml.XmlReader xmlReader, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlXmlReader : System.Xml.XmlReader * System.Xaml.XamlSchemaContext -> System.Xaml.XamlXmlReader
Public Sub New (xmlReader As XmlReader, schemaContext As XamlSchemaContext)
參數
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
例外狀況
xmlReader 或 schemaContext 為 null。
備註
使用此建構子初始化也會設定預設讀取器設定。
適用於
XamlXmlReader(String, XamlXmlReaderSettings)
根據檔案名稱初始化類別的新實例 XamlXmlReader ,以載入預設的 XML 讀取器,並使用 XAML 專用的讀取器設定。
public:
XamlXmlReader(System::String ^ fileName, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(string fileName, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : string * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (fileName As String, settings As XamlXmlReaderSettings)
參數
- fileName
- String
載入的 XML 檔案名稱。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
fileName 是 null。
適用於
XamlXmlReader(String, XamlSchemaContext)
根據檔案名稱初始化該類別的新實例 XamlXmlReader ,載入預設的 XML 讀取器,並附有提供的 XAML 結構上下文。
public:
XamlXmlReader(System::String ^ fileName, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlXmlReader(string fileName, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlXmlReader : string * System.Xaml.XamlSchemaContext -> System.Xaml.XamlXmlReader
Public Sub New (fileName As String, schemaContext As XamlSchemaContext)
參數
- fileName
- String
要載入之檔案的名稱
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
例外狀況
fileName 或 schemaContext 為 null。
適用於
XamlXmlReader(TextReader, XamlSchemaContext, XamlXmlReaderSettings)
基於 ,並使用提供的結構上下文及 XAML 專用設定,初始化該類別XamlXmlReader的新TextReader實例。
public:
XamlXmlReader(System::IO::TextReader ^ textReader, System::Xaml::XamlSchemaContext ^ schemaContext, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.IO.TextReader textReader, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.IO.TextReader * System.Xaml.XamlSchemaContext * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (textReader As TextReader, schemaContext As XamlSchemaContext, settings As XamlXmlReaderSettings)
參數
- textReader
- TextReader
用於 TextReader 初始化。
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
備註
使用此建構子初始化會嘗試將預設讀取器中的部分設定與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(TextReader, XamlSchemaContext)
基於 ,初始化一個新的類別實例 XamlXmlReader , TextReader並附有提供的結構上下文及 XAML 專屬設定。
public:
XamlXmlReader(System::IO::TextReader ^ textReader, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlXmlReader(System.IO.TextReader textReader, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlXmlReader : System.IO.TextReader * System.Xaml.XamlSchemaContext -> System.Xaml.XamlXmlReader
Public Sub New (textReader As TextReader, schemaContext As XamlSchemaContext)
參數
- textReader
- TextReader
用於 TextReader 初始化。
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
例外狀況
適用於
XamlXmlReader(Stream, XamlXmlReaderSettings)
以 XAML 專用設定,初始化基於串流的新類別實例 XamlXmlReader 。
public:
XamlXmlReader(System::IO::Stream ^ stream, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.IO.Stream stream, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.IO.Stream * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (stream As Stream, settings As XamlXmlReaderSettings)
參數
- stream
- Stream
初始串流要載入讀取器。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
stream 是 null。
備註
使用此建構子初始化會嘗試將預設讀取器中的部分設定與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(Stream, XamlSchemaContext)
根據串流初始化該類別的新實例 XamlXmlReader ,並使用提供的 XAML 結構上下文。
public:
XamlXmlReader(System::IO::Stream ^ stream, System::Xaml::XamlSchemaContext ^ schemaContext);
public XamlXmlReader(System.IO.Stream stream, System.Xaml.XamlSchemaContext schemaContext);
new System.Xaml.XamlXmlReader : System.IO.Stream * System.Xaml.XamlSchemaContext -> System.Xaml.XamlXmlReader
Public Sub New (stream As Stream, schemaContext As XamlSchemaContext)
參數
- stream
- Stream
初始串流要載入讀取器。
- schemaContext
- XamlSchemaContext
XAML 處理的 XAML 架構上下文。
例外狀況
stream 或 schemaContext 為 null。
適用於
XamlXmlReader(XmlReader)
使用提供的 XamlXmlReader初始化類別的新實例XmlReader。
public:
XamlXmlReader(System::Xml::XmlReader ^ xmlReader);
public XamlXmlReader(System.Xml.XmlReader xmlReader);
new System.Xaml.XamlXmlReader : System.Xml.XmlReader -> System.Xaml.XamlXmlReader
Public Sub New (xmlReader As XmlReader)
參數
例外狀況
xmlReader 是 null。
備註
使用此建構子初始化同時會設定預設的 XAML 架構上下文及預設讀取器設定。
適用於
XamlXmlReader(TextReader, XamlXmlReaderSettings)
根據 ,並使用 XAML 專用設定初始化該 XamlXmlReader 類別 TextReader的新實例。
public:
XamlXmlReader(System::IO::TextReader ^ textReader, System::Xaml::XamlXmlReaderSettings ^ settings);
public XamlXmlReader(System.IO.TextReader textReader, System.Xaml.XamlXmlReaderSettings settings);
new System.Xaml.XamlXmlReader : System.IO.TextReader * System.Xaml.XamlXmlReaderSettings -> System.Xaml.XamlXmlReader
Public Sub New (textReader As TextReader, settings As XamlXmlReaderSettings)
參數
- textReader
- TextReader
用於 TextReader 初始化。
- settings
- XamlXmlReaderSettings
特定的閱讀器設定。
例外狀況
textReader 是 null。
備註
使用此建構子初始化會嘗試將預設讀取器中的部分設定與 XAML 專屬設定合併。settings 如需詳細資訊,請參閱XamlXmlReaderSettings。
適用於
XamlXmlReader(String)
根據檔案名稱初始化類別的新實例 XamlXmlReader ,以載入預設的 XML 讀取器。
public:
XamlXmlReader(System::String ^ fileName);
public XamlXmlReader(string fileName);
new System.Xaml.XamlXmlReader : string -> System.Xaml.XamlXmlReader
Public Sub New (fileName As String)
參數
- fileName
- String
載入的 XML 檔案名稱。
例外狀況
fileName 是 null。
適用於
XamlXmlReader(TextReader)
public:
XamlXmlReader(System::IO::TextReader ^ textReader);
public XamlXmlReader(System.IO.TextReader textReader);
new System.Xaml.XamlXmlReader : System.IO.TextReader -> System.Xaml.XamlXmlReader
Public Sub New (textReader As TextReader)
參數
- textReader
- TextReader
用於 TextReader 初始化。
例外狀況
textReader 是 null。