Condividi tramite


XamlDirect.ClearProperty(IXamlDirectObject, XamlPropertyIndex) Metodo

Definizione

Cancella il valore della proprietà specificata in un oggetto IXamlDirectObject specificato.

public:
 virtual void ClearProperty(IXamlDirectObject ^ xamlDirectObject, XamlPropertyIndex propertyIndex) = ClearProperty;
void ClearProperty(IXamlDirectObject const& xamlDirectObject, XamlPropertyIndex const& propertyIndex);
public void ClearProperty(IXamlDirectObject xamlDirectObject, XamlPropertyIndex propertyIndex);
function clearProperty(xamlDirectObject, propertyIndex)
Public Sub ClearProperty (xamlDirectObject As IXamlDirectObject, propertyIndex As XamlPropertyIndex)

Parametri

xamlDirectObject
IXamlDirectObject

Riferimento all'oggetto IXamlDirectObject specifico.

propertyIndex
XamlPropertyIndex

Riferimento alla proprietà da cancellare dall'elenco delle proprietà supportate nell'enumerazione XamlPropertyIndex .

Esempio

Nell'esempio seguente viene illustrato come cancellare il valore della proprietà MinHeight di un elemento Border tramite le API XamlDirect.

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

Si applica a