Visual Basic (Declaration) | |
---|---|
Public Overridable Sub Invalidate() |
Visual Basic (Usage) | ![]() |
---|---|
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 | ![]() |
---|---|
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# | ![]() |
---|---|
private void InvalidateExample(AnnContainer container) { foreach(AnnObject obj in container.Children) { if(obj is AnnLineObject) { obj.Stroke = Colors.Red; obj.Invalidate(); } } } |
SilverlightCSharp | ![]() |
---|---|
private void InvalidateExample(AnnContainer container) { foreach(AnnObject obj in container.Children) { if(obj is AnnLineObject) { obj.Stroke = Colors.Red; obj.Invalidate(); } } } |
SilverlightVB | ![]() |
---|---|
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)