Partager via


IDifferenceViewer Interface

A difference viewer is a container for viewing an IDifferenceBuffer in an inline or side-by-side mode. It keeps the scroll state of the different views in sync, and provides helpers for scrolling to differences and matches in all views.

Namespace:  Microsoft.VisualStudio.Text.Differencing
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Declaration
Public Interface IDifferenceViewer _
    Inherits IPropertyOwner
public interface IDifferenceViewer : IPropertyOwner
public interface class IDifferenceViewer : IPropertyOwner
type IDifferenceViewer =  
    interface 
        interface IPropertyOwner 
    end
public interface IDifferenceViewer extends IPropertyOwner

The IDifferenceViewer type exposes the following members.

Properties

  Name Description
Public property ActiveViewType Gets or sets the active view that last had focus.
Public property AreViewsSynchronized Determines whether the left and right views are synchronized in the side by side view.
Public property DifferenceBuffer Gets or sets the IDifferenceBuffer that this viewer is displaying.
Public property InlineView Gets or sets the view for displaying Inline differences.
Public property IsClosed Determines whether this viewer is closed.
Public property LeftView Gets or sets the view for displaying the left buffer for SideBySide differences.
Public property Options Gets or sets the general difference viewer options (DifferenceViewerOptions).
Public property Properties Gets the collection of properties controlled by the property owner. (Inherited from IPropertyOwner.)
Public property RightView Gets or sets the view for displaying the right buffer for SideBySide differences.
Public property ViewMode Gets or sets the view mode (inline or side-by-side).

Top

Methods

  Name Description
Public method Close Closes the viewer and all contained hosts.
Public method ScrollToChange Scroll and move the caret to the start of the given difference.
Public method ScrollToMatch Scroll and move the caret to the start of the given match.
Public method ScrollToNextChange(Boolean) Given the cursor position in the last focused text view, scroll and move the caret to the next difference.
Public method ScrollToNextChange(SnapshotPoint, Boolean) Scroll and move the caret to the next difference after the specified location.
Public method ScrollToPreviousChange(Boolean) Given the cursor position in the last focused text view, scroll and move the caret to the previous difference.
Public method ScrollToPreviousChange(SnapshotPoint, Boolean) Scroll and move the caret to the previous difference before the specified location.

Top

Events

  Name Description
Public event Closed Occurs when the view is closed.
Public event ViewModeChanged Occurs when the ViewMode changes.

Top

See Also

Reference

Microsoft.VisualStudio.Text.Differencing Namespace