LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
SupportsStroke Property
See Also 
Leadtools.Windows.Annotations Namespace > AnnObject Class : SupportsStroke Property



Gets a value indicating whether this AnnObject object supports a stroke. Supported in Silverlight, Windows Phone 7

Syntax

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;}
C++/CLI 
public:
virtual property bool SupportsStroke {
   bool get();
}

Property Value

true if this AnnObject object supports a stroke; false otherwise.

Example

Visual BasicCopy 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;
      }
   }

}
SilverlightCSharpCopy 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;
      }
   }

}
SilverlightVBCopy 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

Remarks

(Read only)

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

SupportsStroke requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.