LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)
LEAD Technologies, Inc

SupportsStroke Property

Example 





Gets a value indicating whether this AnnObject object supports a stroke. .NET support Silverlight support
Syntax
public virtual bool SupportsStroke {get;}
'Declaration
 
Public Overridable ReadOnly Property SupportsStroke As Boolean
'Usage
 
Dim instance As AnnObject
Dim value As Boolean
 
value = instance.SupportsStroke
public virtual bool SupportsStroke {get;}
 get_SupportsStroke(); 
public:
virtual property bool SupportsStroke {
   bool get();
}

Property Value

true if this AnnObject object supports a stroke; false otherwise.
Example
Copy CodeCopy 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
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;
      }
   }

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

}
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: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnObject Class
AnnObject Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.