The AnnButtonObject Class supports WPF/Silverlight.
The AnnButtonObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.
Defines an annotation push button object.Visual Basic (Declaration) | |
---|---|
Public Class AnnButtonObject Inherits AnnTextObject Implements IAnnFont, IAnnHeader, IAnnObject, IAnnRectangle, IAnnText |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnButtonObject |
C# | |
---|---|
public class AnnButtonObject : AnnTextObject, IAnnFont, IAnnHeader, IAnnObject, IAnnRectangle, IAnnText |
C++/CLI | |
---|---|
public ref class AnnButtonObject : public AnnTextObject, IAnnFont, IAnnHeader, IAnnObject, IAnnRectangle, IAnnText |
This example creates a new button object located at (100, 200) and with dimensions 400 X 600 pixels.
Visual Basic | Copy Code |
---|---|
Private Sub AnnButtonObject_AnnButtonObject(ByVal container As AnnContainer, ByVal textString As String) Dim button As AnnButtonObject = New AnnButtonObject() button.Text = textString button.FontFamilyName = "Arial" button.FontSize = 10 button.FontStyle = AnnFontStyle.Normal button.Rect = New Rect(100, 200, 400, 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.FontFamilyName = "Arial"; button.FontStyle = AnnFontStyle.Normal; button.Rect = new Rect(100, 200, 400, 600); button.FontSize = 10; button.IsPushed = false; container.Children.Add(button); } |
SilverlightCSharp | Copy Code |
---|---|
SilverlightVB | Copy Code |
---|---|
XAML | Copy 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> |
The AnnButtonObject class inherits the the AnnTextObject class, which implements the IAnnText 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.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
Leadtools.Windows.Annotations.AnnObject
Leadtools.Windows.Annotations.AnnRectangleObject
Leadtools.Windows.Annotations.AnnTextObject
Leadtools.Windows.Annotations.AnnButtonObject
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)