LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
DefaultPicture Property
See Also 
Leadtools.Windows.Annotations Namespace > AnnVideoObject Class : DefaultPicture Property



Gets or sets the default picture used by all AnnVideoObject objects. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Shared Property DefaultPicture As AnnPicture
Visual Basic (Usage)Copy Code
Dim value As AnnPicture
 
AnnVideoObject.DefaultPicture = value
 
value = AnnVideoObject.DefaultPicture
C# 
public static AnnPicture DefaultPicture {get; set;}
C++/CLI 
public:
static property AnnPicture^ DefaultPicture {
   AnnPicture^ get();
   void set (    AnnPicture^ value);
}

Property Value

An AnnPicture class that defines the picture used by the AnnVideoObject.

Example

Visual BasicCopy Code
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
C#Copy Code
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");
}
SilverlightCSharpCopy Code
SilverlightVBCopy Code

Remarks

Set the UseOriginalPicture property to true to revert back to the original picture.

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

DefaultPicture requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.