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.Data.Tools.Delta
Assembly:  Microsoft.VisualStudio.Data.Tools.Delta (in Microsoft.VisualStudio.Data.Tools.Delta.dll)

Syntax

'Declaration
Public Interface IDifferenceViewer _
    Inherits IPropertyOwner
'Usage
Dim instance As IDifferenceViewer
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 DifferenceBuffer The IDifferenceBuffer that this viewer is displaying.
Public property HighlightMode The highlight mode of the InlineHost.
Public property InlineHost The host for displaying Inline differences.
Public property IsClosed Determine if this viewer is closed.
Public property LeftHost The host for displaying the left buffer for SideBySide differences.
Public property LeftPanel The left panel, containing the left buffer.
Public property Options Used to get or set general difference viewer options (DifferenceViewerOptions).
Public property Properties (Inherited from IPropertyOwner.)
Public property RightHost The host for displaying the right buffer for SideBySide differences.
Public property RightPanel The right panel, containing the right buffer.
Public property ViewMode The view mode (inline or side-by-side).
Public property VisualElement The visual element of this viewer.
Public property ZoomLevel Gets or sets the Zoom level for the enclosed text views between 20% to 400%

Top

Methods

  Name Description
Public method Close Close the viewer and all contained hosts.
Public method ScrollToChange Scroll to the start of the given difference.
Public method ScrollToMatch Scroll to the start of the given match.
Public method ScrollToNextChange Given the cursor position in the last focused text view, scroll to the next difference.
Public method ScrollToPreviousChange Given the cursor position in the last focused text view, scroll to the previous difference.

Top

Events

  Name Description
Public event Closed Raised when the view is closed.
Public event GotAggregateFocus Raised when one of the component delta items receives the focus.
Public event HighlightModeChanged Raised when the HighlightMode changes.
Public event InitializationFinished Raised when the viewer is fully initialized, meaning the DifferenceBuffer has computed the first diff. At this point, calling any method on this viewer is valid.
Public event ViewModeChanged Raised when the ViewMode changes.
Public event ZoomLevelChanged Raised when the zoom level of the component delta items is changed.

Top

See Also

Reference

Microsoft.VisualStudio.Data.Tools.Delta Namespace