Visual Basic (Declaration) | |
---|---|
Public Overridable Sub Invalidate() |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnObject instance.Invalidate() |
C# | |
---|---|
public virtual void Invalidate() |
C++/CLI | |
---|---|
public: virtual void Invalidate(); |
This example will check if any of the objects in a container is a line, if so, it will change the color to red and signal the container to redraw the the object.
Visual Basic | Copy Code |
---|---|
Private Sub InvalidateExample(ByVal container As AnnContainer) For Each obj As AnnObject In container.Children If TypeOf (obj) Is AnnLineObject Then obj.Stroke = Colors.Red obj.Invalidate() End If Next End Sub |
C# | Copy Code |
---|---|
private void InvalidateExample(AnnContainer container) { foreach(AnnObject obj in container.Children) { if(obj is AnnLineObject) { obj.Stroke = Colors.Red; obj.Invalidate(); } } } |
SilverlightCSharp | Copy Code |
---|---|
private void InvalidateExample(AnnContainer container) { foreach(AnnObject obj in container.Children) { if(obj is AnnLineObject) { obj.Stroke = Colors.Red; obj.Invalidate(); } } } |
SilverlightVB | Copy Code |
---|---|
Private Sub InvalidateExample(ByVal container As AnnContainer) For Each obj As AnnObject In container.Children If TypeOf obj Is AnnLineObject Then obj.Stroke = Colors.Red obj.Invalidate() End If Next obj End Sub |
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)