Skip to content

RichItemsControl

Mircea Staicu edited this page Aug 10, 2021 · 2 revisions

RichItemsControl Class

Namespace: RichCanvas

Assembly: RichCanvas

Inheritance: ObjectDispatcherObjectDependencyObjectVisualUIElementFrameworkElementControlItemsControlSelectorMultiSelectorRichItemsControl

References: RichItemContainer, RichCanvas

ItemsControl hosting RichCanvas

public class RichItemsControl : MultiSelector  

Constructors

RichItemsControl()

Creates a new instance of RichItemsControl

public RichItemsControl();  

Fields

AppliedTransformProperty

public static DependencyProperty AppliedTransformProperty;  

Field Value

DependencyProperty

AppliedTransformPropertyKey

protected static DependencyPropertyKey AppliedTransformPropertyKey;  

Field Value

DependencyPropertyKey

AutoPanSpeedProperty

public static DependencyProperty AutoPanSpeedProperty;  

Field Value

DependencyProperty

AutoPanTickRateProperty

public static DependencyProperty AutoPanTickRateProperty;  

Field Value

DependencyProperty

DisableAutoPanningProperty

public static DependencyProperty DisableAutoPanningProperty;  

Field Value

DependencyProperty

DisableCacheProperty

public static DependencyProperty DisableCacheProperty;  

Field Value

DependencyProperty

DisableScrollProperty

public static DependencyProperty DisableScrollProperty;  

Field Value

DependencyProperty

DisableZoomProperty

public static DependencyProperty DisableZoomProperty;  

Field Value

DependencyProperty

DrawingEndedEvent

public static RoutedEvent DrawingEndedEvent;  

Field Value

RoutedEvent

EnableGridProperty

public static DependencyProperty EnableGridProperty;  

Field Value

DependencyProperty

EnableSnappingProperty

public static DependencyProperty EnableSnappingProperty;  

Field Value

DependencyProperty

GridSpacingProperty

public static DependencyProperty GridSpacingProperty;  

Field Value

DependencyProperty

GridStyleProperty

public static DependencyProperty GridStyleProperty;  

Field Value

DependencyProperty

IsSelectingProperty

public static DependencyProperty IsSelectingProperty;  

Field Value

DependencyProperty

IsSelectingPropertyKey

protected static DependencyPropertyKey IsSelectingPropertyKey;  

Field Value

DependencyPropertyKey

MaxScaleProperty

public static DependencyProperty MaxScaleProperty;  

Field Value

DependencyProperty

MinScaleProperty

public static DependencyProperty MinScaleProperty;  

Field Value

DependencyProperty

MousePositionProperty

public static DependencyProperty MousePositionProperty;  

Field Value

DependencyProperty

PanningKeyProperty

public static DependencyProperty PanningKeyProperty;  

Field Value

DependencyProperty

RealTimeSelectionEnabledProperty

public static DependencyProperty RealTimeSelectionEnabledProperty;  

Field Value

DependencyProperty

ScaleFactorProperty

public static DependencyProperty ScaleFactorProperty;  

Field Value

DependencyProperty

ScaleProperty

public static DependencyProperty ScaleProperty;  

Field Value

DependencyProperty

ScrollFactorProperty

public static DependencyProperty ScrollFactorProperty;  

Field Value

DependencyProperty

ScrollingEvent

public static RoutedEvent ScrollingEvent;  

Field Value

RoutedEvent

SelectedItemsProperty

public static DependencyProperty SelectedItemsProperty;  

Field Value

DependencyProperty

SelectionRectangleProperty

public static DependencyProperty SelectionRectangleProperty;  

Field Value

DependencyProperty

SelectionRectanglePropertyKey

protected static DependencyPropertyKey SelectionRectanglePropertyKey;  

Field Value

DependencyPropertyKey

SelectionRectangleStyleProperty

public static DependencyProperty SelectionRectangleStyleProperty;  

Field Value

DependencyProperty

TranslateOffsetProperty

public static DependencyProperty TranslateOffsetProperty;  

Field Value

DependencyProperty

ViewportRectProperty

public static DependencyProperty ViewportRectProperty;  

Field Value

DependencyProperty

ZoomingEvent

public static RoutedEvent ZoomingEvent;  

Field Value

RoutedEvent

ZoomKeyProperty

public static DependencyProperty ZoomKeyProperty;  

Field Value

DependencyProperty

Properties

AppliedTransform

Gets the transform that is applied to all child controls.

public TransformGroup AppliedTransform { get; set; }  

Property Value

TransformGroup

AutoPanSpeed

Gets or sets the RichItemsControl.ItemsHost translate speed. Default is 1.

public float AutoPanSpeed { get; set; }  

Property Value

Single

AutoPanTickRate

Gets or sets System.Windows.Threading.DispatcherTimer interval value. Default is 1.

public float AutoPanTickRate { get; set; }  

Property Value

Single

DisableAutoPanning

Gets or sets whether Auto-Panning is disabled. Default is enabled.

public bool DisableAutoPanning { get; set; }  

Property Value

Boolean

DisableCache

Gets or sets whether caching is disabled. Default is true

public bool DisableCache { get; set; }  

Property Value

Boolean

DisableScroll

Gets or sets whether scrolling operation is disabled. Default is enabled.

public bool DisableScroll { get; set; }  

Property Value

Boolean

DisableZoom

Gets or sets whether zooming operation is disabled. Default is enabled.

public bool DisableZoom { get; set; }  

Property Value

Boolean

EnableGrid

Gets or sets whether Grid Drawing is enabled on RichItemsControl.ItemsHost background. Default is disabled.

public bool EnableGrid { get; set; }  

Property Value

Boolean

EnableSnapping

Gets or sets whether grid snap correction on RichItemContainer is applied. Default is disabled.

public bool EnableSnapping { get; set; }  

Property Value

Boolean

GridSpacing

Gets or sets grid drawing viewport size. Default is 10.

public float GridSpacing { get; set; }  

Property Value

Single

GridStyle

Gets or sets the background grid style.

public Drawing GridStyle { get; set; }  

Property Value

Drawing

HasSelections

Gets whether at least one item is selected.

public bool HasSelections { get; set; }  

Property Value

Boolean

IsSelecting

Gets whether the operation in progress is selection.

public bool IsSelecting { get; set; }  

Property Value

Boolean

MaxScale

Gets or sets maximum scale for RichItemsControl.ScaleTransform. Default is 2.

public double MaxScale { get; set; }  

Property Value

Double

MinScale

Gets or sets minimum scale for RichItemsControl.ScaleTransform. Default is 0.1d.

public double MinScale { get; set; }  

Property Value

Double

MousePosition

Gets or sets mouse position relative to RichItemsControl.ItemsHost.

public Point MousePosition { get; set; }  

Property Value

Point

PanningKey

Gets or sets current key used for panning. Default is Space

public Key PanningKey { get; set; }  

Property Value

Key

RealTimeSelectionEnabled

Gets or sets whether real-time selection is enabled. Default is false

public bool RealTimeSelectionEnabled { get; set; }  

Property Value

Boolean

Scale

Gets or sets the current RichItemsControl.ScaleTransform value. Default is 1.

public double Scale { get; set; }  

Property Value

Double

ScaleFactor

Gets or sets the factor used to change RichItemsControl.ScaleTransform on zoom. Default is 1.1d.

public double ScaleFactor { get; set; }  

Property Value

Double

ScrollFactor

Gets or sets the scrolling factor applied when scrolling. Default is 10.

public double ScrollFactor { get; set; }  

Property Value

Double

SelectedItems

Gets or sets the items in the RichItemsControl that are selected.

public IList SelectedItems { get; set; }  

Property Value

IList

SelectionRectangle

Gets the selection area as Rect.

public Rect SelectionRectangle { get; set; }  

Property Value

Rect

SelectionRectangleStyle

Gets or sets selection System.Windows.Shapes.Rectangle style.

public Style SelectionRectangleStyle { get; set; }  

Property Value

Style

TranslateOffset

Gets or sets current RichItemsControl.TranslateTransform.

public Point TranslateOffset { get; set; }  

Property Value

Point

ViewportRect

Gets current viewport rectangle.

public Rect ViewportRect { get; set; }  

Property Value

Rect

ZoomKey

Gets or sets current key used to zoom. Default is LeftCtrl

public Key ZoomKey { get; set; }  

Property Value

Key

Methods

GetContainerForItemOverride()

protected override DependencyObject GetContainerForItemOverride();  

Returns

DependencyObject

IsItemItsOwnContainerOverride(Object)

protected override bool IsItemItsOwnContainerOverride(object item);  

Parameters

item Object

Returns

Boolean

OnApplyTemplate()

public override void OnApplyTemplate();  

OnItemsChanged(NotifyCollectionChangedEventArgs)

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e);  

Parameters

e NotifyCollectionChangedEventArgs

OnMouseLeftButtonUp(MouseButtonEventArgs)

protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e);  

Parameters

e MouseButtonEventArgs

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e);  

Parameters

e MouseButtonEventArgs

OnPreviewMouseMove(MouseEventArgs)

protected override void OnPreviewMouseMove(MouseEventArgs e);  

Parameters

e MouseEventArgs

SelectBySelectionRectangle()

Selects all elements inside RichItemsControl.SelectionRectangle

public void SelectBySelectionRectangle();  

Events

DrawingEnded

Occurs whenever RichCanvas.RichItemsControl.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs) is triggered and the drawing operation finished.

public event RoutedEventHandler DrawingEnded;  

Event Type

RoutedEventHandler

Scrolling

Occurs whenever RichItemsControl.TranslateTransform changes.

public event RoutedEventHandler Scrolling;  

Event Type

RoutedEventHandler

Zooming

Occurs whenever RichItemsControl.ScaleTransform changes.

public event RoutedEventHandler Zooming;  

Event Type

RoutedEventHandler

Clone this wiki locally