-
-
Notifications
You must be signed in to change notification settings - Fork 245
Nodify_Minimap
Namespace: Nodify
Assembly: Nodify
Inheritance: Object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → ItemsControl → Minimap
References: InputProcessor, 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
The area covered by the items and the viewport rectangle in graph space.
public Rect Extent { get; set; }
Property Value
protected InputProcessor InputProcessor { get; set; }
Property Value
Whether the user is currently panning the minimap.
protected bool IsPanning { get; set; }
Property Value
Whether the minimap can move and zoom the viewport.
public bool IsReadOnly { get; set; }
Property Value
The area covered by the MinimapItems in graph space.
public Rect ItemsExtent { get; set; }
Property Value
Gets the panel that holds all the MinimapItems.
protected Panel ItemsHost { get; set; }
Property Value
The max position from the NodifyEditor.ItemsExtent that the viewport can move to.
public Size MaxViewportOffset { get; set; }
Property Value
Gets the current mouse location in graph space coordinates (relative to the Minimap.ItemsHost).
public Point MouseLocation { get; set; }
Property Value
Whether the minimap should resize to also display the whole viewport.
public bool ResizeToViewport { get; set; }
Property Value
public Point ViewportLocation { get; set; }
Property Value
public Size ViewportSize { get; set; }
Property Value
Gets or sets the style to use for the viewport rectangle.
public Style ViewportStyle { get; set; }
Property Value
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
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
public override void OnApplyTemplate();
protected override void OnKeyDown(KeyEventArgs e);
Parameters
protected override void OnKeyUp(KeyEventArgs e);
Parameters
protected override void OnLostMouseCapture(MouseEventArgs e);
Parameters
protected override void OnMouseDown(MouseButtonEventArgs e);
Parameters
protected override void OnMouseMove(MouseEventArgs e);
Parameters
protected override void OnMouseUp(MouseButtonEventArgs e);
Parameters
protected override void OnMouseWheel(MouseWheelEventArgs e);
Parameters
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.
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.
Triggered when zooming in or out using the mouse wheel.
public event ZoomEventHandler Zoom;
Event Type