XamlDirect.CreateInstance(XamlTypeIndex) Méthode

Définition

Crée un instance IXamlDirectObject du type spécifié par le paramètre 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

Paramètres

typeIndex
XamlTypeIndex

Fait référence au type XAML spécifique de l’ensemble des types pris en charge répertoriés dans l’énumération XamlTypeIndex .

Retours

Renvoie le instance IXamlDirectObject.

Exemples

L’exemple suivant montre comment créer un instance IXamlDirectObject pour un élément Border.

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

S’applique à

Voir aussi