XamlDirect.CreateInstance(XamlTypeIndex) Metodo

Definizione

Crea un'istanza IXamlDirectObject del tipo specificato dal parametro XamlTypeIndex .

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

Parametri

typeIndex
XamlTypeIndex

Fa riferimento al tipo XAML specifico dal set di tipi supportati elencati nell'enumerazione XamlTypeIndex .

Restituisce

Restituisce l'istanza IXamlDirectObject .

Esempio

Nell'esempio seguente viene illustrato come creare un'istanza IXamlDirectObject per un elemento Border .

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

Si applica a

Vedi anche