Leadtools.Windows.Annotations Namespace : AnnImageObject Class |
public class AnnImageObject : AnnRectangleObject, IAnnHeader, IAnnImage, IAnnObject, IAnnPicture, IAnnRectangle
'Declaration Public Class AnnImageObject Inherits AnnRectangleObject Implements IAnnHeader, IAnnImage, IAnnObject, IAnnPicture, IAnnRectangle
'Usage Dim instance As AnnImageObject
public ref class AnnImageObject : public AnnRectangleObject, IAnnHeader, IAnnImage, IAnnObject, IAnnPicture, IAnnRectangle
The AnnStampObject class inherits the AnnImageObject class and access the common Picture property through this inheritance. For more information, refer to Using Pictures in WPF Annotation Objects
For XAML example, refer to AnnHotspotObject.
Imports Leadtools.Windows.Controls Imports Leadtools.Windows.Annotations Private Sub AnnImageObject_AnnImageObject(ByVal container As AnnContainer, ByVal imageFileName As String) Dim img As AnnImageObject = New AnnImageObject() Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName))) pic.TransparentMode = AnnTransparentMode.None pic.TransparentColor = Colors.Black img.Picture = pic img.Rect = New Rect(100, 200, 400, 600) container.Children.Add(img) End Sub
using Leadtools.Windows.Controls; using Leadtools.Windows.Annotations; using Leadtools.Demos; using Leadtools.Help; private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName) { AnnImageObject img = new AnnImageObject(); AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName))); pic.TransparentColor = Colors.Black; pic.TransparentMode = AnnTransparentMode.None; img.Rect = new Rect(100, 200, 400, 600); img.Picture = pic; container.Children.Add(img); }
using Leadtools.Windows.Controls; using Leadtools.Windows.Annotations; using Leadtools.Examples; private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName) { AnnImageObject img = new AnnImageObject(); AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName))); pic.TransparentColor = Colors.Black; pic.TransparentMode = AnnTransparentMode.None; img.Rect = new Rect(100, 200, 400, 600); img.Picture = pic; container.Children.Add(img); }
Imports Leadtools.Windows.Controls Imports Leadtools.Windows.Annotations Private Sub AnnImageObject_AnnImageObject(ByVal container As AnnContainer, ByVal imageFileName As String) Dim img As AnnImageObject = New AnnImageObject() Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName))) pic.TransparentColor = Colors.Black pic.TransparentMode = AnnTransparentMode.None img.Rect = New Rect(100, 200, 400, 600) img.Picture = pic container.Children.Add(img) End Sub