Visual Basic (Declaration) | |
---|---|
Public Overridable ReadOnly Property SupportsStroke As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnObject Dim value As Boolean value = instance.SupportsStroke |
C# | |
---|---|
public virtual bool SupportsStroke {get;} |
Property Value
true if this AnnObject object supports a stroke; false otherwise.
Visual Basic | Copy Code |
---|---|
Private Sub AnnObjectBase_SupportsStroke(ByVal container As AnnContainer) For Each obj As AnnObject In container.Children If obj.SupportsStroke Then obj.Stroke = Colors.Blue obj.StrokeThickness = 1.0 End If If obj.SupportsFill Then obj.Fill = Colors.White End If If TypeOf obj Is IAnnFont Then Dim font As IAnnFont = DirectCast(obj, IAnnFont) font.FontFamilyName = "Arial" font.FontSize = 10.0 DirectCast(obj, IAnnText).Foreground = Colors.Red End If Next obj End Sub |
C# | Copy Code |
---|---|
private void AnnObjectBase_SupportsStroke(AnnContainer container) { foreach (AnnObject obj in container.Children) { if (obj.SupportsStroke) { obj.Stroke = Colors.Blue; obj.StrokeThickness = 1.0; } if (obj.SupportsFill) obj.Fill = Colors.White; if (obj is IAnnFont) { IAnnFont font = (obj as IAnnFont); font.FontFamilyName = "Arial"; font.FontSize = 10.0; (obj as IAnnText).Foreground = Colors.Red; } } } |
SilverlightCSharp | Copy Code |
---|---|
private void AnnObjectBase_SupportsStroke(AnnContainer container) { foreach (AnnObject obj in container.Children) { if (obj.SupportsStroke) { obj.Stroke = Colors.Blue; obj.StrokeThickness = 1.0; } if (obj.SupportsFill) obj.Fill = Colors.White; if (obj is IAnnFont) { IAnnFont font = (obj as IAnnFont); font.FontFamilyName = "Arial"; font.FontSize = 10.0; (obj as IAnnText).Foreground = Colors.Red; } } } |
SilverlightVB | Copy Code |
---|---|
Private Sub AnnObjectBase_SupportsStroke(ByVal container As AnnContainer)
For Each obj As AnnObject In container.Children
If obj.SupportsStroke Then
obj.Stroke = Colors.Blue
obj.StrokeThickness = 1.0
End If
If obj.SupportsFill Then
obj.Fill = Colors.White
End If
If TypeOf obj Is IAnnFont Then
Dim font As IAnnFont = (TryCast(obj, IAnnFont))
font.FontFamilyName = "Arial"
font.FontSize = 10.0
TryCast(obj, IAnnText).Foreground = Colors.Red
End If
Next obj
End Sub |
(Read only)
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)