MiniMapElement
Represents a mini map element that provides an overview of the main map with viewport control, zoom management, and interactive navigation capabilities.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class MiniMapElement : BaseMapElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IMapViewport
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementBaseMapElementMiniMapElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the MiniMapElement class with default input behavior for interactive mini map navigation.
public MiniMapElement()
Fields
protected bool isBringIntoView
protected bool suspendViewportUpdates
Identifies the ViewportControlBackColor dependency property that defines the background color of the viewport control rectangle.
public static RadProperty ViewportControlBackColorProperty
Identifies the ViewportControlBorderColor dependency property that defines the border color of the viewport control rectangle.
public static RadProperty ViewportControlBorderColorProperty
Properties
Gets a value indicating whether a collapse or expand animation is currently active, preventing user interactions during the transition.
public bool IsAnimating { get; protected set; }
Gets or sets a value indicating whether the mini map is currently collapsed to show only the toggle button.
public bool IsCollapsed { get; set; }
Gets the main map element that this mini map is associated with for synchronization and viewport management.
public RadMapElement MapElement { get; }
Gets or sets the mini map display mode that determines how the mini map behaves in relation to the main map zoom level and viewport.
public MiniMapMode MiniMapMode { get; set; }
Gets or sets the size of the mini map display area, automatically scaled for DPI settings with layout invalidation support.
public Size MiniMapSize { get; set; }
Gets the toggle button element that allows users to expand or collapse the mini map display.
public MiniMapToggleButtonElement ToggleMiniMapButton { get; }
Gets or sets the background color of the viewport control rectangle that represents the main map's visible area within the mini map.
public Color ViewportControlBackColor { get; set; }
Gets or sets the border color of the viewport control rectangle that represents the main map's visible area within the mini map.
public Color ViewportControlBorderColor { get; set; }
Gets or sets the current zoom level of the mini map, with special handling for WholeWorld mode where zoom level is fixed at 1.
public override int ZoomLevel { get; set; }
Overrides:
Gets or sets the zoom offset used to calculate the mini map zoom level relative to the main map when MiniMapMode is set to OffsetZoom.
public int ZoomOffset { get; set; }
Methods
Arranges the mini map child elements within the specified final size, positioning the toggle button in the top-right corner.
Collapses the mini map to show only the toggle button using animated size transition.
public virtual void Collapse()
Creates and initializes the child elements of the mini map, including the toggle button for expand/collapse functionality.
protected override void CreateChildElements()
Overrides:
Creates and configures the toggle button element for expanding and collapsing the mini map display.
protected virtual MiniMapToggleButtonElement CreateToggleMiniMapButton()
A configured MiniMapToggleButtonElement for mini map visibility control.
Draws the viewport control rectangle that represents the main map's visible area within the mini map display.
Expands the mini map to show the full map display using animated size transition.
public virtual void Expand()
Initializes the default field values and visual properties for the mini map element, including border settings and size configuration.
protected override void InitializeFields()
Overrides:
Measures the required size for the mini map element, handling collapsed state and animation constraints.
Handles the completion of the collapse animation, finalizing the collapsed state and updating the toggle button state.
protected virtual void OnCollapseAnimationFinished(object sender, AnimationStatusEventArgs e)
The source of the event.
eAnimationStatusEventArgsAn AnimationStatusEventArgs containing the animation completion information.
Handles the completion of the expand animation, finalizing the expanded state and updating the toggle button state.
protected virtual void OnExpandAnimationFinished(object sender, AnimationStatusEventArgs e)
The source of the event.
eAnimationStatusEventArgsAn AnimationStatusEventArgs containing the animation completion information.
Handles viewport changes from the main map element, synchronizing the mini map display when in OffsetZoom mode.
protected virtual void OnMapElementViewportChanged(object sender, ViewportChangedEventArgs e)
The source of the event.
eViewportChangedEventArgsA ViewportChangedEventArgs containing the viewport change information.
Handles property change notifications, specifically managing layout invalidation when the MaxSize property changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
A RadPropertyChangedEventArgs containing the property change information.
Overrides:
Handles the completion of map provider initialization by cloning the provider for mini map use and updating the viewport display.
public override void OnProviderInitializationComplete(IMapProvider mapProvider)
The IMapProvider that has completed initialization.
Overrides:
Handles the toggle button state changed event, triggering expand or collapse operations based on the new toggle state.
protected virtual void OnToggleMiniMapButtonToggleStateChanged(object sender, StateChangedEventArgs args)
The source of the event.
argsStateChangedEventArgsA StateChangedEventArgs containing the new state information.
Handles the toggle button state changing event, preventing state changes during animation transitions.
protected virtual void OnToggleMiniMapButtonToggleStateChanging(object sender, StateChangingEventArgs args)
The source of the event.
argsStateChangingEventArgsA StateChangingEventArgs containing the state change information.
Paints the mini map in OffsetZoom mode with clipping and viewport control rectangle overlay.
Paints the mini map element with mode-specific rendering logic and viewport control rectangle display.
Paints the mini map in StaticZoom mode with clipping and viewport control rectangle overlay.
Paints the mini map in WholeWorld mode with scaled rendering and viewport control rectangle overlay.
Associates the mini map with a new main map element, managing event subscriptions for viewport synchronization.
protected virtual void SetMapElement(RadMapElement mapElement)
The RadMapElement to associate with this mini map.
Sets the mini map display mode, managing event subscriptions and triggering necessary layout and viewport updates.
protected virtual void SetMiniMapMode(MiniMapMode mode)
The MiniMapMode to set for the mini map display behavior.
Sets the zoom offset value and triggers viewport updates when the mini map is in OffsetZoom mode.
protected virtual void SetZoomOffset(int value)
The zoom offset value to set relative to the main map zoom level.
Subscribes to the main map viewport change events to maintain synchronization between the mini map and main map displays.
protected virtual void Subscribe()
Unsubscribes from the main map viewport change events to prevent memory leaks and unwanted synchronization during disposal.
protected virtual void Unsubscribe()
Performs zoom operations on the mini map, with restrictions based on the current mini map mode settings.