VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging.Annotation.Wpf.UI.Undo Namespace / WpfAnnotationViewerUndoMonitor Class
Members Example



In This Topic
    WpfAnnotationViewerUndoMonitor Class
    In This Topic
    Undo monitor that monitors the Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewer object and adds undo action to an undo manager if Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewCollection is changed.
    Object Model
    WpfAnnotationViewerUndoMonitor ClassIDataStorage InterfaceImageCollectionUndoManagersDispatcher ClassUndoManager Class
    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 example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also