C#
VB
C++
Gets or sets the default picture used by all AnnVideoObject 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 AnnVideoObject.
Set the UseOriginalPicture property to true to revert back to the original picture.
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;
public void AnnVideoObject_DefaultPicture(AnnContainer container, ImageViewer viewer, string newVideoPicture)
{
// first add a new AnnVideoObject with the original picture
AnnVideoObject obj = new AnnVideoObject();
obj.Rect = new Rect(100, 100, 100, 100);
container.Children.Add(obj);
MessageBox.Show("An Video object with the original picture");
// now change the picture to one of our own
AnnPicture picture = new AnnPicture(new BitmapImage(new Uri(newVideoPicture)));
AnnVideoObject.DefaultPicture = picture;
// at this point, all new AnnVideoObject objects will use this new picture
// add another Video object
obj = new AnnVideoObject();
obj.Rect = new Rect(100, 210, 100, 100);
container.Children.Add(obj);
MessageBox.Show("An Video object with the new picture");
// set the picture back to the original value
AnnVideoObject.UseOriginalPicture = true;
// add another Video object
obj = new AnnVideoObject();
obj.Rect = new Rect(100, 320, 100, 100);
container.Children.Add(obj);
MessageBox.Show("An Video object with the original picture");
}
Imports Leadtools.Windows.Annotations
Imports Leadtools.Windows.Controls
Public Sub AnnVideoObject_DefaultPicture(ByVal container As AnnContainer, ByVal viewer As ImageViewer, ByVal newVideoPicture As String)
' first add a new AnnVideoObject with the original picture
Dim obj As New AnnVideoObject()
obj.Rect = New Rect(100, 100, 100, 100)
container.Children.Add(obj)
MessageBox.Show("An Video object with the original picture")
' now change the picture to one of our own
Dim picture As New AnnPicture(New BitmapImage(New Uri(newVideoPicture)))
AnnVideoObject.DefaultPicture = picture
' at this point, all new AnnVideoObject objects will use this new picture
' add another Video object
obj = New AnnVideoObject()
obj.Rect = New Rect(100, 210, 100, 100)
container.Children.Add(obj)
MessageBox.Show("An Video object with the new picture")
' set the picture back to the original value
AnnVideoObject.UseOriginalPicture = True
' add another Video object
obj = New AnnVideoObject()
obj.Rect = New Rect(100, 320, 100, 100)
container.Children.Add(obj)
MessageBox.Show("An Video 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