←Select platform

SupportsStroke Property

Summary

Gets a value indicating whether this AnnObject object supports a stroke.

Syntax

C#
VB
C++
public virtual bool SupportsStroke { get; } 
  
Public Overridable ReadOnly Property SupportsStroke As Boolean 
public: 
virtual property bool SupportsStroke { 
   bool get(); 
} 

Property Value

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

Example

C#
VB
Silverlight C#
Silverlight VB
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Annotations; 
using Leadtools.Demos; 
using Leadtools.Help; 
 
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; 
      } 
   } 
 
} 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Windows.Annotations 
 
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 
using Leadtools.Windows.Controls; 
using Leadtools.Windows.Annotations; 
using Leadtools.Examples; 
using Leadtools.Silverlight.Demos; 
//using Leadtools.Help; 
 
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; 
      } 
   } 
 
} 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Windows.Annotations 
Imports Leadtools.Silverlight.Demos 
'using Leadtools.Help; 
 
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 

Requirements

Target Platforms

See Also

Reference

AnnObject Class

AnnObject Members

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Annotations Assembly