Class SelectionRectangle
Visualizes an ArtemisDevice with optional per-LED colors
Inheritance
Implements
Inherited Members
Namespace: Artemis.UI.Shared
Assembly: Artemis.UI.Shared.dll
Syntax
public class SelectionRectangle : Control, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, IInputElement, IDataTemplateHost, INamed, ISetterValue
Constructors
SelectionRectangle()
Declaration
public SelectionRectangle()
Fields
BackgroundProperty
Defines the Background property.
Declaration
public static readonly StyledProperty<IBrush> BackgroundProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<IBrush> |
BorderBrushProperty
Defines the BorderBrush property.
Declaration
public static readonly StyledProperty<IBrush> BorderBrushProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<IBrush> |
BorderRadiusProperty
Defines the BorderRadius property.
Declaration
public static readonly StyledProperty<double> BorderRadiusProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<double> |
BorderThicknessProperty
Defines the BorderThickness property.
Declaration
public static readonly StyledProperty<double> BorderThicknessProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<double> |
InputElementProperty
Defines the InputElement property.
Declaration
public static readonly StyledProperty<InputElement?> InputElementProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<InputElement> |
IsSelectingProperty
Defines the read-only IsSelecting property.
Declaration
public static readonly DirectProperty<SelectionRectangle, bool> IsSelectingProperty
Field Value
| Type | Description |
|---|---|
| DirectProperty<SelectionRectangle, bool> |
ZoomRatioProperty
Defines the ZoomRatio property.
Declaration
public static readonly StyledProperty<double> ZoomRatioProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<double> |
Properties
Background
Gets or sets a brush used to paint the control's background.
Declaration
public IBrush Background { get; set; }
Property Value
| Type | Description |
|---|---|
| IBrush |
BorderBrush
Gets or sets a brush used to paint the control's border
Declaration
public IBrush BorderBrush { get; set; }
Property Value
| Type | Description |
|---|---|
| IBrush |
BorderRadius
Gets or sets the radius of the control's border
Declaration
public double BorderRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
BorderThickness
Gets or sets the width of the control's border
Declaration
public double BorderThickness { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
InputElement
Gets or sets the element that captures input for the selection rectangle.
Declaration
public InputElement? InputElement { get; set; }
Property Value
| Type | Description |
|---|---|
| InputElement |
IsSelecting
Gets a boolean indicating whether the selection rectangle is currently performing a selection.
Declaration
public bool IsSelecting { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ZoomRatio
Gets or sets the zoom ratio to counteract when drawing
Declaration
public double ZoomRatio { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
Declaration
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| VisualTreeAttachmentEventArgs | e | The event args. |
Overrides
OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is removed from a rooted visual tree.
Declaration
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| VisualTreeAttachmentEventArgs | e | The event args. |
Overrides
OnSelectionFinished(SelectionRectangleEventArgs)
Invokes the SelectionFinished event
Declaration
protected virtual void OnSelectionFinished(SelectionRectangleEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectionRectangleEventArgs | e |
OnSelectionUpdated(SelectionRectangleEventArgs)
Invokes the SelectionUpdated event
Declaration
protected virtual void OnSelectionUpdated(SelectionRectangleEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectionRectangleEventArgs | e |
Render(DrawingContext)
Renders the visual to a Avalonia.Media.DrawingContext.
Declaration
public override void Render(DrawingContext drawingContext)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingContext | drawingContext |
Overrides
Events
SelectionFinished
Occurs when the selection has finished, indicating the user stopped dragging.
Declaration
public event EventHandler<SelectionRectangleEventArgs>? SelectionFinished
Event Type
| Type | Description |
|---|---|
| EventHandler<SelectionRectangleEventArgs> |
SelectionUpdated
Occurs when the selection rect is being updated, indicating the user is dragging.
Declaration
public event EventHandler<SelectionRectangleEventArgs>? SelectionUpdated
Event Type
| Type | Description |
|---|---|
| EventHandler<SelectionRectangleEventArgs> |