Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Indicates whether the ExtendedProperties collection contains a specific ExtendedProperty object.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Function Contains ( _
ep As ExtendedProperty _
) As Boolean
'Usage
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 function Contains(
ep : ExtendedProperty
) : boolean
Parameters
ep
Type: Microsoft.Ink.ExtendedPropertyThe ExtendedProperty object to check for.
Return Value
Type: System.Boolean
true if the ExtendedProperties collection contains a specific ExtendedProperty object; otherwise, false.
Examples
In this example, each Stroke object in the provided Strokes collection is examined. If a Stroke object contains all of the extended properties in the provided ExtendedProperties collection, the Stroke is modified to display in a different color.
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();
}
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0