XamlDirect.CreateInstance(XamlTypeIndex) XamlDirect.CreateInstance(XamlTypeIndex) XamlDirect.CreateInstance(XamlTypeIndex) XamlDirect.CreateInstance(XamlTypeIndex) Method

Definition

Creates an IXamlDirectObject instance of the type specified by the XamlTypeIndex parameter.

public : IXamlDirectObject CreateInstance(XamlTypeIndex typeIndex)
IXamlDirectObject CreateInstance(XamlTypeIndex typeIndex) const;
public IXamlDirectObject CreateInstance(XamlTypeIndex typeIndex)
Public Function CreateInstance(typeIndex As XamlTypeIndex) As IXamlDirectObject

Parameters

typeIndex
XamlTypeIndex XamlTypeIndex

Refers to the specific XAML type from the set of supported types listed in the XamlTypeIndex enum.

Returns

Examples

The following example shows how to create an IXamlDirectObject instance for a Border element.

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

See also

  • T:Windows.UI.Xaml.Core.Direct.XamlDirect * M:Windows.UI.Xaml.Core.Direct.XamlDirect.GetDefault