VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Annotation.Wpf.UI.Undo Namespace / WpfAnnotationViewerUndoMonitor Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    WpfAnnotationViewerUndoMonitor Class
    In This Topic
    Undo monitor that monitors the WpfAnnotationViewer object and adds undo action to an undo manager if WpfAnnotationViewCollection is changed.
    Object Model
    IDataStorage ImageCollectionUndoManagersDispatcher UndoManager WpfAnnotationViewerUndoMonitor
    Syntax
    'Declaration
    
    Public Class WpfAnnotationViewerUndoMonitor
       Inherits Vintasoft.Imaging.Wpf.UI.Undo.WpfImageViewerUndoMonitor
    
    
    public class WpfAnnotationViewerUndoMonitor : Vintasoft.Imaging.Wpf.UI.Undo.WpfImageViewerUndoMonitor
    
    
    public __gc class WpfAnnotationViewerUndoMonitor : public Vintasoft.Imaging.Wpf.UI.Undo.WpfImageViewerUndoMonitor*
    
    
    public ref class WpfAnnotationViewerUndoMonitor : public Vintasoft.Imaging.Wpf.UI.Undo.WpfImageViewerUndoMonitor^
    
    
    Example

    This C#/VB.NET code shows how to monitor the changes in annotations.

    
    ''' <summary>
    ''' Creates the undo monitor for annotation viewer.
    ''' </summary>
    ''' <param name="undoManager">The undo manager.</param>
    ''' <param name="annotationViewer">The annotation viewer.</param>
    Public Shared Function CreateUndoMonitorForAnnotationViewer(undoManager As Vintasoft.Imaging.Undo.UndoManager, annotationViewer As Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewer) As Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor
        ' create the undo monitor for annotation viewer
        Dim undoMonitor As New Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor(undoManager, annotationViewer)
    
        ' returns the undo monitor for annotation viewer
        Return undoMonitor
    End Function
    
    
    
    /// <summary>
    /// Creates the undo monitor for annotation viewer.
    /// </summary>
    /// <param name="undoManager">The undo manager.</param>
    /// <param name="annotationViewer">The annotation viewer.</param>
    public static Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor CreateUndoMonitorForAnnotationViewer(
        Vintasoft.Imaging.Undo.UndoManager undoManager,
        Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewer annotationViewer)
    {
        // create the undo monitor for annotation viewer
        Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor undoMonitor =
            new Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor(undoManager, annotationViewer);
    
        // returns the undo monitor for annotation viewer
        return undoMonitor;
    }
    
    

    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.Undo.UndoMonitor
          Vintasoft.Imaging.Wpf.UI.Undo.WpfImageViewerUndoMonitor
             Vintasoft.Imaging.Annotation.Wpf.UI.Undo.WpfAnnotationViewerUndoMonitor

    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also