Skip to content

Minimap

Namespace: Nodify

Assembly: Nodify

Inheritance: ObjectDispatcherObjectDependencyObjectVisualUIElementFrameworkElementControlItemsControlMinimap

References: InputProcessor, MinimapState.KeyboardNavigation, MinimapItem, NodifyEditor, MinimapState.Panning, ZoomEventArgs, ZoomEventHandler, MinimapState.Zooming

A minimap control that can position the viewport, and zoom in and out.

public class Minimap : ItemsControl
public Minimap();

Gets or sets whether panning cancellation is allowed (see Nodify.Interactivity.EditorGestures.MinimapGestures.CancelAction).

public static bool AllowPanningCancellation { get; set; }

Property Value

Boolean

The area covered by the items and the viewport rectangle in graph space.

public Rect Extent { get; set; }

Property Value

Rect

protected InputProcessor InputProcessor { get; set; }

Property Value

InputProcessor

Whether the user is currently panning the minimap.

protected bool IsPanning { get; set; }

Property Value

Boolean

Whether the minimap can move and zoom the viewport.

public bool IsReadOnly { get; set; }

Property Value

Boolean

The area covered by the MinimapItems in graph space.

public Rect ItemsExtent { get; set; }

Property Value

Rect

Gets the panel that holds all the MinimapItems.

protected Panel ItemsHost { get; set; }

Property Value

Panel

The max position from the NodifyEditor.ItemsExtent that the viewport can move to.

public Size MaxViewportOffset { get; set; }

Property Value

Size

Gets the current mouse location in graph space coordinates (relative to the Minimap.ItemsHost).

public Point MouseLocation { get; set; }

Property Value

Point

Defines the distance to pan when using directional input (such as arrow keys).

public static double NavigationStepSize { get; set; }

Property Value

Double

Whether the minimap should resize to also display the whole viewport.

public bool ResizeToViewport { get; set; }

Property Value

Boolean

public Point ViewportLocation { get; set; }

Property Value

Point

public Size ViewportSize { get; set; }

Property Value

Size

Gets or sets the style to use for the viewport rectangle.

public Style ViewportStyle { get; set; }

Property Value

Style

Starts the panning operation from the specified location. Call Nodify.Minimap.EndPanning to end the panning operation.

public void BeginPanning();
public void BeginPanning(Point location);

Parameters

location Point

Cancels the current panning operation and reverts the viewport to its initial location if Minimap.AllowPanningCancellation is true. Otherwise, it ends the panning operation by calling Nodify.Minimap.EndPanning.

public void CancelPanning();

Ends the current panning operation, retaining the current Minimap.ViewportLocation.

public void EndPanning();
protected override DependencyObject GetContainerForItemOverride();

Returns

DependencyObject

Translates the event location to graph space coordinates (relative to the Minimap.ItemsHost).

public Point GetLocationInsideMinimap(MouseEventArgs args);

Parameters

args MouseEventArgs: The mouse event.

Returns

Point: A location inside the minimap

protected override bool IsItemItsOwnContainerOverride(object item);

Parameters

item Object

Returns

Boolean

public override void OnApplyTemplate();
protected override void OnKeyDown(KeyEventArgs e);

Parameters

e KeyEventArgs

protected override void OnKeyUp(KeyEventArgs e);

Parameters

e KeyEventArgs

protected override void OnLostMouseCapture(MouseEventArgs e);

Parameters

e MouseEventArgs

protected override void OnMouseDown(MouseButtonEventArgs e);

Parameters

e MouseButtonEventArgs

protected override void OnMouseMove(MouseEventArgs e);

Parameters

e MouseEventArgs

protected override void OnMouseUp(MouseButtonEventArgs e);

Parameters

e MouseButtonEventArgs

protected override void OnMouseWheel(MouseWheelEventArgs e);

Parameters

e MouseWheelEventArgs

public void ResetViewport();
protected void SetViewportLocation(Point location);

Parameters

location Point

Sets the viewport location to the specified location.

public void UpdatePanning(Point location);

Parameters

location Point: The location to pan the viewport to.

Pans the viewport by the specified amount.

public void UpdatePanning(Vector amount);

Parameters

amount Vector: The amount to pan the viewport.

Zoom at the specified location in graph space coordinates.

public void ZoomAtPosition(double zoom, Point location);

Parameters

zoom Double: The zoom factor.

location Point: The location to focus when zooming.

Zoom in at the viewport’s center.

public void ZoomIn();

Zoom out at the viewport’s center.

public void ZoomOut();

Triggered when zooming in or out using the mouse wheel.

public event ZoomEventHandler Zoom;

Event Type

ZoomEventHandler