Leadtools.Windows.Annotations Requires Document/Medical license. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
AnnPointObject Class
See Also  Members   Example 
Leadtools.Windows.Annotations Namespace : AnnPointObject Class





Defines an annotation point object.

Object Model





Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnPointObject 
   Inherits AnnObjectBase
   Implements IAnnPictureObject 
Visual Basic (Usage)Copy Code
Dim instance As AnnPointObject
C# 
[SerializableAttribute()]
public class AnnPointObject : AnnObjectBase, IAnnPictureObject  
C++/CLI 
[SerializableAttribute()]
public ref class AnnPointObject : public AnnObjectBase, IAnnPictureObject  
XAML Object Element Usage 

<AnnPointObject .../>

XAML Object Element Usage 

<AnnPointObject .../>

Example

This example adds a new point object to a container.

Visual BasicCopy Code
Private Sub AnnPointObject_AnnPointObject(ByVal viewer As BitmapSourceViewer, ByVal container As AnnContainer)
  Dim point As AnnPointObject = New AnnPointObject()
    point.CenterPoint = New System.Windows.Point(100, 100)
  point.ShowPicture = True
  ' default picture, no need to change anything
  container.Children.Add(point)
  MessageBox.Show("Picture")

  ' show with a radius
  point.Radius = 16.0
  point.Stroke = Brushes.Red
  point.StrokeThickness = 1.0
  point.ShowPicture = False

  MessageBox.Show("No picture")
End Sub
C#Copy Code
private void AnnPointObject_AnnPointObject(BitmapSourceViewer viewer, AnnContainer container) 

   AnnPointObject point = new AnnPointObject(); 
   point.CenterPoint = new Point(100, 100); 
   point.ShowPicture = true; 
   // default picture, no need to change anything 
   container.Children.Add(point); 
   MessageBox.Show("Picture"); 
 
   // show with a radius 
   point.Radius = 16.0; 
   point.Stroke = Brushes.Red; 
   point.StrokeThickness = 1.0; 
   point.ShowPicture = false; 
 
   MessageBox.Show("No picture"); 
}
XAMLCopy Code
<Window x:Class="WPFSamples.AnnPointObject" Title="Leadtools.Windows.Annotations" Height="600" Width="800" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Leadtools_Windows_Annotations="clr-namespace:Leadtools.Windows.Annotations;assembly=Leadtools.Windows.Annotations"> 
  <Leadtools_Windows_Annotations:AnnPointObject Stroke="Blue" StrokeThickness="3.0" ShowPicture="False" Picture="{x:Null}" Radius="25" CenterPoint="100,100" Header="Point Object" /> 
</Window>

Remarks

The point object is a single point. This object works in two ways: If the value of ShowPicture is true; this object will draw the picture in Picture with CenterPoint as the center point. AnnObjectBase.Stroke, AnnObjectBase.Fill and Radius will be ignored. If ShowPicture is false; this object will draw an ellipse using AnnObjectBase.Stroke, AnnObjectBase.Fill and Radius around CenterPoint.

This class implements the IAnnPictureObject interface and accesses the IAnnPictureObject.Picture property that handles the picture associated with the annotation object.

For more information, refer to Using Pictures in WPF Annotation Objects

For more information about the point annotation object refer to AnnPointObject for WPF. For more information about the automated point annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Point Tab.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  Leadtools.Windows.Annotations.AnnObjectBase
                     Leadtools.Windows.Annotations.AnnPointObject

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also

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