Defines an annotation image object.
Object Model
Syntax
XAML Object Element Usage | |
---|
<AnnImageObject .../> |
XAML Object Element Usage | |
---|
<AnnImageObject .../> |
Example
For XAML example, refer to AnnHotspotObject.
This example creates a new image object with top, left at 100, 200, width, height of 400, 600 pixels and then adds it to a container.
Visual Basic | Copy Code |
---|
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 = AnnPictureTransparentMode.None
pic.TransparentColor = Colors.Black
img.Picture = pic
img.Left = 100
img.Top = 200
img.Width = 400
img.Height = 600
container.Children.Add(img)
End Sub |
C# | Copy Code |
---|
private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName) { AnnImageObject img = new AnnImageObject(); AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName))); pic.TransparentMode = AnnPictureTransparentMode.None; pic.TransparentColor = Colors.Black; img.Picture = pic; img.Left = 100; img.Top = 200; img.Width = 400; img.Height = 600; container.Children.Add(img); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also