Minimap
Minimap Class
Section titled “Minimap Class”Namespace: Nodify
Assembly: Nodify
Inheritance: Object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → ItemsControl → Minimap
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
Constructors
Section titled “Constructors”Minimap()
Section titled “Minimap()”public Minimap();
Properties
Section titled “Properties”AllowPanningCancellation
Section titled “AllowPanningCancellation”Gets or sets whether panning cancellation is allowed (see Nodify.Interactivity.EditorGestures.MinimapGestures.CancelAction).
public static bool AllowPanningCancellation { get; set; }
Property Value
Extent
Section titled “Extent”The area covered by the items and the viewport rectangle in graph space.
public Rect Extent { get; set; }
Property Value
InputProcessor
Section titled “InputProcessor”protected InputProcessor InputProcessor { get; set; }
Property Value
IsPanning
Section titled “IsPanning”Whether the user is currently panning the minimap.
protected bool IsPanning { get; set; }
Property Value
IsReadOnly
Section titled “IsReadOnly”Whether the minimap can move and zoom the viewport.
public bool IsReadOnly { get; set; }
Property Value
ItemsExtent
Section titled “ItemsExtent”The area covered by the MinimapItems in graph space.
public Rect ItemsExtent { get; set; }
Property Value
ItemsHost
Section titled “ItemsHost”Gets the panel that holds all the MinimapItems.
protected Panel ItemsHost { get; set; }
Property Value
MaxViewportOffset
Section titled “MaxViewportOffset”The max position from the NodifyEditor.ItemsExtent that the viewport can move to.
public Size MaxViewportOffset { get; set; }
Property Value
MouseLocation
Section titled “MouseLocation”Gets the current mouse location in graph space coordinates (relative to the Minimap.ItemsHost).
public Point MouseLocation { get; set; }
Property Value
NavigationStepSize
Section titled “NavigationStepSize”Defines the distance to pan when using directional input (such as arrow keys).
public static double NavigationStepSize { get; set; }
Property Value
ResizeToViewport
Section titled “ResizeToViewport”Whether the minimap should resize to also display the whole viewport.
public bool ResizeToViewport { get; set; }
Property Value
ViewportLocation
Section titled “ViewportLocation”public Point ViewportLocation { get; set; }
Property Value
ViewportSize
Section titled “ViewportSize”public Size ViewportSize { get; set; }
Property Value
ViewportStyle
Section titled “ViewportStyle”Gets or sets the style to use for the viewport rectangle.
public Style ViewportStyle { get; set; }
Property Value
Methods
Section titled “Methods”BeginPanning()
Section titled “BeginPanning()”Starts the panning operation from the specified location. Call Nodify.Minimap.EndPanning to end the panning operation.
public void BeginPanning();
BeginPanning(Point)
Section titled “BeginPanning(Point)”public void BeginPanning(Point location);
Parameters
location
Point
CancelPanning()
Section titled “CancelPanning()”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();
EndPanning()
Section titled “EndPanning()”Ends the current panning operation, retaining the current Minimap.ViewportLocation.
public void EndPanning();
GetContainerForItemOverride()
Section titled “GetContainerForItemOverride()”protected override DependencyObject GetContainerForItemOverride();
Returns
GetLocationInsideMinimap(MouseEventArgs)
Section titled “GetLocationInsideMinimap(MouseEventArgs)”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
IsItemItsOwnContainerOverride(Object)
Section titled “IsItemItsOwnContainerOverride(Object)”protected override bool IsItemItsOwnContainerOverride(object item);
Parameters
item
Object
Returns
OnApplyTemplate()
Section titled “OnApplyTemplate()”public override void OnApplyTemplate();
OnKeyDown(KeyEventArgs)
Section titled “OnKeyDown(KeyEventArgs)”protected override void OnKeyDown(KeyEventArgs e);
Parameters
OnKeyUp(KeyEventArgs)
Section titled “OnKeyUp(KeyEventArgs)”protected override void OnKeyUp(KeyEventArgs e);
Parameters
OnLostMouseCapture(MouseEventArgs)
Section titled “OnLostMouseCapture(MouseEventArgs)”protected override void OnLostMouseCapture(MouseEventArgs e);
Parameters
OnMouseDown(MouseButtonEventArgs)
Section titled “OnMouseDown(MouseButtonEventArgs)”protected override void OnMouseDown(MouseButtonEventArgs e);
Parameters
OnMouseMove(MouseEventArgs)
Section titled “OnMouseMove(MouseEventArgs)”protected override void OnMouseMove(MouseEventArgs e);
Parameters
OnMouseUp(MouseButtonEventArgs)
Section titled “OnMouseUp(MouseButtonEventArgs)”protected override void OnMouseUp(MouseButtonEventArgs e);
Parameters
OnMouseWheel(MouseWheelEventArgs)
Section titled “OnMouseWheel(MouseWheelEventArgs)”protected override void OnMouseWheel(MouseWheelEventArgs e);
Parameters
ResetViewport()
Section titled “ResetViewport()”public void ResetViewport();
SetViewportLocation(Point)
Section titled “SetViewportLocation(Point)”protected void SetViewportLocation(Point location);
Parameters
location
Point
UpdatePanning(Point)
Section titled “UpdatePanning(Point)”Sets the viewport location to the specified location.
public void UpdatePanning(Point location);
Parameters
location
Point: The location to pan the viewport to.
UpdatePanning(Vector)
Section titled “UpdatePanning(Vector)”Pans the viewport by the specified amount.
public void UpdatePanning(Vector amount);
Parameters
amount
Vector: The amount to pan the viewport.
ZoomAtPosition(Double, Point)
Section titled “ZoomAtPosition(Double, Point)”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.
ZoomIn()
Section titled “ZoomIn()”Zoom in at the viewport’s center.
public void ZoomIn();
ZoomOut()
Section titled “ZoomOut()”Zoom out at the viewport’s center.
public void ZoomOut();
Events
Section titled “Events”Triggered when zooming in or out using the mouse wheel.
public event ZoomEventHandler Zoom;
Event Type