XamlDirect.CreateInstance(XamlTypeIndex) メソッド

定義

XamlTypeIndex パラメーターで指定された型の IXamlDirectObject インスタンスを作成します。

public:
 virtual IXamlDirectObject ^ CreateInstance(XamlTypeIndex typeIndex) = CreateInstance;
IXamlDirectObject CreateInstance(XamlTypeIndex const& typeIndex);
public IXamlDirectObject CreateInstance(XamlTypeIndex typeIndex);
function createInstance(typeIndex)
Public Function CreateInstance (typeIndex As XamlTypeIndex) As IXamlDirectObject

パラメーター

typeIndex
XamlTypeIndex

XamlTypeIndex 列挙型に一覧表示されている一連のサポートされている型から、特定の XAML 型を参照します。

戻り値

IXamlDirectObject インスタンスを返します。

次の例は、Border 要素の IXamlDirectObject インスタンスを作成する方法を示しています。

XamlDirect xd = XamlDirect.GetDefault();
IXamlDirectObject border = xd.CreateInstance(XamlTypeIndex.Border);
XamlDirect^ xd = XamlDirect::GetDefault();
IXamlDirectObject^ border = xd->CreateInstance(XamlTypeIndex::Border);

適用対象

こちらもご覧ください