Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Aggiornamento: novembre 2007
Indica se l'insieme ExtendedProperties contiene un oggetto ExtendedProperty specifico.
Spazio dei nomi: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Sintassi
'Dichiarazione
Public Function Contains ( _
ep As ExtendedProperty _
) As Boolean
'Utilizzo
Dim instance As ExtendedProperties
Dim ep As ExtendedProperty
Dim returnValue As Boolean
returnValue = instance.Contains(ep)
public bool Contains(
ExtendedProperty ep
)
public:
bool Contains(
ExtendedProperty^ ep
)
public boolean Contains(
ExtendedProperty ep
)
public function Contains(
ep : ExtendedProperty
) : boolean
Parametri
- ep
Tipo: Microsoft.Ink.ExtendedProperty
Oggetto ExtendedProperty da verificare.
Valore restituito
Tipo: System.Boolean
true se l'insieme ExtendedProperties contiene un oggetto ExtendedProperty specifico; in caso contrario, false.
Esempi
In questo esempio, viene esaminato ogni oggetto Stroke dell'insieme Strokes fornito. Se un oggetto Stroke contiene tutte le proprietà estese dell'insieme ExtendedProperties fornito, l'oggetto Stroke viene modificato al fine di essere visualizzato in un colore diverso.
Private Sub HighlightLikeStrokes(ByVal ep As ExtendedProperties, ByVal theStrokes As Strokes)
If ep.Count > 0 Then
For Each theStroke As Stroke In theStrokes
Dim containsCount As Integer = 0
For k As Integer = 0 To ep.Count
If theStroke.ExtendedProperties.Contains(ep(k)) Then
containsCount += 1
End If
Next
' If all the extended properties are there, color the stroke blue
If containsCount = ep.Count Then
theStroke.DrawingAttributes.Color = Color.PowderBlue
End If
Next
mInkOverlay.AttachedControl.Invalidate()
End If
End Sub
private void HighlightLikeStrokes(ExtendedProperties ep, Strokes theStrokes)
{
if (ep.Count > 0)
{
foreach (Stroke theStroke in theStrokes)
{
int containsCount = 0;
for (int k = 0; k < ep.Count; k++)
{
if (theStroke.ExtendedProperties.Contains(ep[k]))
{
containsCount++;
}
}
// If all the extended properties are there, color the stroke blue
if (containsCount == ep.Count)
{
theStroke.DrawingAttributes.Color = Color.PowderBlue;
}
}
mInkOverlay.AttachedControl.Invalidate();
}
}
Piattaforme
Windows Vista
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
Informazioni sulla versione
.NET Framework
Supportato in: 3.0