Class EdgeDrawableControl
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
EdgeDrawableControl
Implements
IAvaloniaObjectDebug
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
INamed
IAvaloniaListItemValidator<ILogical>
IAvaloniaListItemValidator<Visual>
IInputElement
IDataTemplateHost
IVisualBrushInitialize
ISetterValue
Inherited Members
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.Loaded
Control.Unloaded
Control.SizeChanged
InputElement.FocusableProperty
InputElement.IsEnabledProperty
InputElement.IsEffectivelyEnabledProperty
InputElement.CursorProperty
InputElement.IsKeyboardFocusWithinProperty
InputElement.IsFocusedProperty
InputElement.IsHitTestVisibleProperty
InputElement.IsPointerOverProperty
InputElement.IsTabStopProperty
InputElement.GotFocusEvent
InputElement.GettingFocusEvent
InputElement.LostFocusEvent
InputElement.LosingFocusEvent
InputElement.KeyDownEvent
InputElement.KeyUpEvent
InputElement.TabIndexProperty
InputElement.TextInputEvent
InputElement.TextInputMethodClientRequestedEvent
InputElement.PointerEnteredEvent
InputElement.PointerExitedEvent
InputElement.PointerMovedEvent
InputElement.PointerPressedEvent
InputElement.PointerReleasedEvent
InputElement.PointerCaptureLostEvent
InputElement.PointerWheelChangedEvent
InputElement.ContextRequestedEvent
InputElement.ContextCanceledEvent
InputElement.IsHoldingEnabledProperty
InputElement.IsHoldWithMouseEnabledProperty
InputElement.PinchEvent
InputElement.PinchEndedEvent
InputElement.PullGestureEvent
InputElement.PullGestureEndedEvent
InputElement.SwipeGestureEvent
InputElement.SwipeGestureEndedEvent
InputElement.ScrollGestureEvent
InputElement.ScrollGestureInertiaStartingEvent
InputElement.ScrollGestureEndedEvent
InputElement.PointerTouchPadGestureMagnifyEvent
InputElement.PointerTouchPadGestureRotateEvent
InputElement.PointerTouchPadGestureSwipeEvent
InputElement.TappedEvent
InputElement.RightTappedEvent
InputElement.HoldingEvent
InputElement.DoubleTappedEvent
InputElement.Focus(NavigationMethod, KeyModifiers)
InputElement.GetIsHoldingEnabled(StyledElement)
InputElement.GetIsHoldWithMouseEnabled(StyledElement)
InputElement.Focusable
InputElement.IsEnabled
InputElement.Cursor
InputElement.IsKeyboardFocusWithin
InputElement.IsFocused
InputElement.IsHitTestVisible
InputElement.IsPointerOver
InputElement.IsTabStop
InputElement.IsEffectivelyEnabled
InputElement.TabIndex
InputElement.KeyBindings
InputElement.GestureRecognizers
InputElement.GotFocus
InputElement.GettingFocus
InputElement.LostFocus
InputElement.LosingFocus
InputElement.KeyDown
InputElement.KeyUp
InputElement.TextInput
InputElement.TextInputMethodClientRequested
InputElement.PointerEntered
InputElement.PointerExited
InputElement.PointerMoved
InputElement.PointerPressed
InputElement.PointerReleased
InputElement.PointerCaptureLost
InputElement.PointerWheelChanged
InputElement.ContextRequested
InputElement.ContextCanceled
InputElement.Pinch
InputElement.PinchEnded
InputElement.PullGesture
InputElement.PullGestureEnded
InputElement.ScrollGesture
InputElement.ScrollGestureInertiaStarting
InputElement.ScrollGestureEnded
InputElement.PointerTouchPadGestureMagnify
InputElement.PointerTouchPadGestureRotate
InputElement.SwipeGesture
InputElement.SwipeGestureEnded
InputElement.PointerTouchPadGestureSwipe
InputElement.Tapped
InputElement.RightTapped
InputElement.Holding
InputElement.DoubleTapped
Interactive.RaiseEvent(RoutedEventArgs)
Layoutable.DesiredSizeProperty
Layoutable.WidthProperty
Layoutable.HeightProperty
Layoutable.MinWidthProperty
Layoutable.MaxWidthProperty
Layoutable.MinHeightProperty
Layoutable.MaxHeightProperty
Layoutable.MarginProperty
Layoutable.HorizontalAlignmentProperty
Layoutable.VerticalAlignmentProperty
Layoutable.UseLayoutRoundingProperty
Layoutable.UpdateLayout()
Layoutable.ApplyTemplate()
Layoutable.Measure(Size)
Layoutable.Arrange(Rect)
Layoutable.InvalidateMeasure()
Layoutable.InvalidateArrange()
Layoutable.Width
Layoutable.Height
Layoutable.MinWidth
Layoutable.MaxWidth
Layoutable.MinHeight
Layoutable.MaxHeight
Layoutable.Margin
Layoutable.HorizontalAlignment
Layoutable.VerticalAlignment
Layoutable.DesiredSize
Layoutable.IsMeasureValid
Layoutable.IsArrangeValid
Layoutable.UseLayoutRounding
Layoutable.EffectiveViewportChanged
Layoutable.LayoutUpdated
Visual.BoundsProperty
Visual.ClipToBoundsProperty
Visual.ClipProperty
Visual.IsVisibleProperty
Visual.OpacityProperty
Visual.OpacityMaskProperty
Visual.CacheModeProperty
Visual.EffectProperty
Visual.HasMirrorTransformProperty
Visual.RenderTransformProperty
Visual.RenderTransformOriginProperty
Visual.FlowDirectionProperty
Visual.VisualParentProperty
Visual.ZIndexProperty
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.Bounds
Visual.ClipToBounds
Visual.Clip
Visual.IsEffectivelyVisible
Visual.IsVisible
Visual.Opacity
Visual.OpacityMask
Visual.CacheMode
Visual.Effect
Visual.HasMirrorTransform
Visual.RenderTransform
Visual.RenderTransformOrigin
Visual.FlowDirection
Visual.ZIndex
Visual.AttachedToVisualTree
Visual.DetachedFromVisualTree
StyledElement.DataContextProperty
StyledElement.NameProperty
StyledElement.ParentProperty
StyledElement.TemplatedParentProperty
StyledElement.ThemeProperty
StyledElement.BeginInit()
StyledElement.EndInit()
StyledElement.ApplyStyling()
StyledElement.Name
StyledElement.Classes
StyledElement.DataContext
StyledElement.IsInitialized
StyledElement.Styles
StyledElement.StyleKey
StyledElement.Resources
StyledElement.TemplatedParent
StyledElement.Theme
StyledElement.Parent
StyledElement.ActualThemeVariant
StyledElement.AttachedToLogicalTree
StyledElement.DetachedFromLogicalTree
StyledElement.DataContextChanged
StyledElement.Initialized
StyledElement.ResourcesChanged
StyledElement.ActualThemeVariantChanged
Animatable.TransitionsProperty
Animatable.Transitions
AvaloniaObject.CheckAccess()
AvaloniaObject.VerifyAccess()
AvaloniaObject.ClearValue(AvaloniaProperty)
AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
AvaloniaObject.ClearValue<T>(StyledProperty<T>)
AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetHashCode()
AvaloniaObject.GetValue(AvaloniaProperty)
AvaloniaObject.GetValue<T>(StyledProperty<T>)
AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
AvaloniaObject.IsAnimating(AvaloniaProperty)
AvaloniaObject.IsSet(AvaloniaProperty)
AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
AvaloniaObject.Bind(AvaloniaProperty, BindingBase)
AvaloniaObject.CoerceValue(AvaloniaProperty)
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.Dispatcher
AvaloniaObject.PropertyChanged
Namespace: MOSAIC.ViewModels.Graph
Assembly: MOSAIC.dll
Syntax
public sealed class EdgeDrawableControl : Control, IAvaloniaObjectDebug, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IAvaloniaListItemValidator<ILogical>, IAvaloniaListItemValidator<Visual>, IInputElement, IDataTemplateHost, IVisualBrushInitialize, ISetterValue
Constructors
EdgeDrawableControl()
Declaration
public EdgeDrawableControl()
Fields
PendGray
Declaration
private static readonly Pen PendGray
Field Value
| Type | Description |
|---|---|
| Pen |
PendGreen
Declaration
private static readonly Pen PendGreen
Field Value
| Type | Description |
|---|---|
| Pen |
PendRed
Declaration
private static readonly Pen PendRed
Field Value
| Type | Description |
|---|---|
| Pen |
VerticesProperty
Declaration
public static readonly StyledProperty<ObservableCollection<VertexViewModel>?> VerticesProperty
Field Value
| Type | Description |
|---|---|
| StyledProperty<ObservableCollection<VertexViewModel>> |
_fillBrush
Declaration
private IBrush _fillBrush
Field Value
| Type | Description |
|---|---|
| IBrush |
_pend
Declaration
private PendingKind _pend
Field Value
| Type | Description |
|---|---|
| PendingKind |
_pendFrom
Declaration
private Point _pendFrom
Field Value
| Type | Description |
|---|---|
| Point |
_pendTo
Declaration
private Point _pendTo
Field Value
| Type | Description |
|---|---|
| Point |
_strokePen
Declaration
private Pen _strokePen
Field Value
| Type | Description |
|---|---|
| Pen |
_subs
Declaration
private readonly Dictionary<VertexViewModel, (PropertyChangedEventHandler vm, PropertyChangedEventHandler? val)> _subs
Field Value
| Type | Description |
|---|---|
| Dictionary<VertexViewModel, (PropertyChangedEventHandler vm, PropertyChangedEventHandler val)> |
_textBrush
Declaration
private IBrush _textBrush
Field Value
| Type | Description |
|---|---|
| IBrush |
Properties
Vertices
Declaration
public ObservableCollection<VertexViewModel>? Vertices { get; set; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<VertexViewModel> |
Methods
ClearPending()
Hide the in-flight wire.
Declaration
public void ClearPending()
DrawArrow(DrawingContext, Point, Point, Pen)
Declaration
private static void DrawArrow(DrawingContext ctx, Point start, Point end, Pen pen)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingContext | ctx | |
| Point | start | |
| Point | end | |
| Pen | pen |
InputAnchorFor(VertexViewModel, int, int)
Declaration
private static Point InputAnchorFor(VertexViewModel consumer, int index, int portCount)
Parameters
| Type | Name | Description |
|---|---|---|
| VertexViewModel | consumer | |
| int | index | |
| int | portCount |
Returns
| Type | Description |
|---|---|
| Point |
OnChanged(object?, NotifyCollectionChangedEventArgs)
Declaration
private void OnChanged(object? s, NotifyCollectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| object | s | |
| NotifyCollectionChangedEventArgs | e |
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
Avalonia.Visual.OnDetachedFromVisualTree(Avalonia.VisualTreeAttachmentEventArgs)
OnThemeChanged(object?, AppTheme)
Declaration
private void OnThemeChanged(object? sender, AppTheme theme)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | |
| AppTheme | theme |
Render(DrawingContext)
Renders the visual to a Avalonia.Media.DrawingContext.
Declaration
public override void Render(DrawingContext c)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingContext | c |
Overrides
Avalonia.Visual.Render(Avalonia.Media.DrawingContext)
ResetSubs()
Declaration
private void ResetSubs()
SetPending(Point, Point, PendingKind)
Show the in-flight wire from from to to in the given state.
Declaration
public void SetPending(Point from, Point to, PendingKind kind)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | from | |
| Point | to | |
| PendingKind | kind |
Sub(VertexViewModel)
Declaration
private void Sub(VertexViewModel vm)
Parameters
| Type | Name | Description |
|---|---|---|
| VertexViewModel | vm |
Unsub(VertexViewModel)
Declaration
private void Unsub(VertexViewModel vm)
Parameters
| Type | Name | Description |
|---|---|---|
| VertexViewModel | vm |
UnsubAll()
Declaration
private void UnsubAll()
UpdateBrushes()
Declaration
private void UpdateBrushes()
Implements
Avalonia.Diagnostics.IAvaloniaObjectDebug
Avalonia.IDataContextProvider
Avalonia.LogicalTree.ILogical
Avalonia.Styling.IThemeVariantHost
Avalonia.Controls.IResourceHost
Avalonia.Controls.IResourceNode
Avalonia.Styling.IStyleHost
Avalonia.Controls.ISetLogicalParent
Avalonia.Controls.ISetInheritanceParent
Avalonia.INamed
Avalonia.Collections.IAvaloniaListItemValidator<T>
Avalonia.Collections.IAvaloniaListItemValidator<T>
Avalonia.Input.IInputElement
Avalonia.Controls.Templates.IDataTemplateHost
Avalonia.Rendering.IVisualBrushInitialize
Avalonia.Styling.ISetterValue