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





Defines an annotation push button object.

Object Model



Syntax

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

<AnnButtonObject .../>

XAML Object Element Usage 

<AnnButtonObject .../>

Example

This example creates a new button object located at (100, 200) and with dimensions 400 X 600 pixels.

Visual BasicCopy Code
Private Sub AnnButtonObject_AnnButtonObject(ByVal container As AnnContainer, ByVal textString As String)
  Dim button As AnnButtonObject = New AnnButtonObject()
  button.Text = textString
  button.FontFamily = New FontFamily("Arial")
  button.FontSize = 10
  button.FontStyle = FontStyles.Normal
  button.Left = 100
  button.Top = 200
  button.Width = 400
  button.Height = 600
  button.IsPushed = False
  container.Children.Add(button)
End Sub
C#Copy Code
private void AnnButtonObject_AnnButtonObject(AnnContainer container, string textString) 

   AnnButtonObject button = new AnnButtonObject(); 
   button.Text = textString; 
   button.FontFamily = new FontFamily("Arial"); 
   button.FontSize = 10; 
   button.FontStyle = FontStyles.Normal; 
   button.Left = 100; 
   button.Top = 200; 
   button.Width = 400; 
   button.Height = 600; 
   button.IsPushed = false; 
   container.Children.Add(button); 
}
XAMLCopy Code
<Window x:Class="WPFSamples.AnnButtonObject" 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:AnnButtonObject Left="100" Top="100" Width="200" Height="100" Header="Button Object" Text="Button Text" IsPushed="False" /> 
</Window>

Remarks

The push button annotation object is an image of a standard Windows button that can be activated.

The AnnButtonObject class inherits the the AnnTextObject class, which implements the IAnnTextObject interface. For more information, refer to Using Text in WPF Annotation Objects.

For more information about the button annotation object refer to AnnButtonObject for WPF. For more information about the automated annotation button object, refer to WPF Annotation Objects - Automated Features.

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.AnnRectangleObject
                        Leadtools.Windows.Annotations.AnnTextObject
                           Leadtools.Windows.Annotations.AnnButtonObject

Requirements

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

See Also

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