C#
VB
C++
Gets or sets the default picture used by all AnnHotspotObject objects.
public static AnnPicture DefaultPicture { get; set; } Public Shared Property DefaultPicture As Leadtools.Windows.Annotations.AnnPicture
public:static property Leadtools.Windows.Annotations.AnnPicture^ DefaultPicture {Leadtools.Windows.Annotations.AnnPicture^ get();void set ( Leadtools.Windows.Annotations.AnnPicture^ );}
An AnnPicture class that defines the picture used by the AnnHotspotObject.
Use UseOriginalPicture to revert back to the original picture.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;public void AnnHotspotObject_DefaultPicture(AnnContainer container, ImageViewer viewer, string newHotspotPicture){// first add a new AnnHotspotObject with the original pictureAnnHotspotObject obj = new AnnHotspotObject();obj.Rect = new Rect(100, 100, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the original picture");// now change the picture to one of our ownBitmapSource img = new BitmapImage(new Uri(newHotspotPicture));AnnPicture picture = new AnnPicture(img);AnnHotspotObject.DefaultPicture = picture;// at this point, all new AnnHotspotObject objects will use this new picture// add another Hotspot objectobj = new AnnHotspotObject();obj.Rect = new Rect(100, 210, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the new picture");// set the picture back to the original valueAnnHotspotObject.UseOriginalPicture = true;// add another Hotspot objectobj = new AnnHotspotObject();obj.Rect = new Rect(100, 320, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the original picture");}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPublic Sub AnnHotspotObject_DefaultPicture(ByVal container As AnnContainer, ByVal viewer As ImageViewer, ByVal newHotspotPicture As String)' first add a new AnnHotspotObject with the original pictureDim obj As AnnHotspotObject = New AnnHotspotObject()obj.Rect = New Rect(100, 100, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the original picture")' now change the picture to one of our ownDim img As BitmapSource = New BitmapImage(New Uri(newHotspotPicture))Dim picture As AnnPicture = New AnnPicture(img)AnnHotspotObject.DefaultPicture = picture' at this point, all new AnnHotspotObject objects will use this new picture' add another Hotspot objectobj = New AnnHotspotObject()obj.Rect = New Rect(100, 210, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the new picture")' set the picture back to the original valueAnnHotspotObject.UseOriginalPicture = True' add another Hotspot objectobj = New AnnHotspotObject()obj.Rect = New Rect(100, 320, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the original picture")End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;public void AnnHotspotObject_DefaultPicture(AnnContainer container, ImageViewer viewer, string newHotspotPicture){// first add a new AnnHotspotObject with the original pictureAnnHotspotObject obj = new AnnHotspotObject();obj.Rect = new Rect(100, 100, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the original picture");// now change the picture to one of our ownBitmapSource img = new BitmapImage(new Uri(newHotspotPicture));AnnPicture picture = new AnnPicture(img);AnnHotspotObject.DefaultPicture = picture;// at this point, all new AnnHotspotObject objects will use this new picture// add another Hotspot objectobj = new AnnHotspotObject();obj.Rect = new Rect(100, 210, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the new picture");// set the picture back to the original valueAnnHotspotObject.UseOriginalPicture = true;// add another Hotspot objectobj = new AnnHotspotObject();obj.Rect = new Rect(100, 320, 100, 100);container.Children.Add(obj);MessageBox.Show("An Hotspot object with the original picture");}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPublic Sub AnnHotspotObject_DefaultPicture(ByVal container As AnnContainer, ByVal viewer As ImageViewer, ByVal newHotspotPicture As String)' first add a new AnnHotspotObject with the original pictureDim obj As AnnHotspotObject = New AnnHotspotObject()obj.Rect = New Rect(100, 100, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the original picture")' now change the picture to one of our ownDim img As BitmapSource = New BitmapImage(New Uri(newHotspotPicture))Dim picture As AnnPicture = New AnnPicture(img)AnnHotspotObject.DefaultPicture = picture' at this point, all new AnnHotspotObject objects will use this new picture' add another Hotspot objectobj = New AnnHotspotObject()obj.Rect = New Rect(100, 210, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the new picture")' set the picture back to the original valueAnnHotspotObject.UseOriginalPicture = True' add another Hotspot objectobj = New AnnHotspotObject()obj.Rect = New Rect(100, 320, 100, 100)container.Children.Add(obj)MessageBox.Show("An Hotspot object with the original picture")End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
