The AnnImageObject Class supports WPF/Silverlight.
The AnnImageObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.
Defines an annotation image object.
Supported in Silverlight, Windows Phone 7
Object Model
Syntax
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 = AnnTransparentMode.None
pic.TransparentColor = Colors.Black
img.Picture = pic
img.Rect = New Rect(100, 200, 400, 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.TransparentColor = Colors.Black;
pic.TransparentMode = AnnTransparentMode.None;
img.Rect = new Rect(100, 200, 400, 600);
img.Picture = pic;
container.Children.Add(img);
} |
SilverlightCSharp | Copy Code |
---|
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);
} |
SilverlightVB | 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.TransparentColor = Colors.Black
pic.TransparentMode = AnnTransparentMode.None
img.Rect = New Rect(100, 200, 400, 600)
img.Picture = pic
container.Children.Add(img)
End Sub |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)
See Also