Class MainView

Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
TemplatedControl
ContentControl
UserControl
MainView
Implements
IAvaloniaObjectDebug
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
INamed
IAvaloniaListItemValidator<ILogical>
IAvaloniaListItemValidator<Visual>
IInputElement
IDataTemplateHost
IVisualBrushInitialize
ISetterValue
IContentControl
IContentPresenterHost
Inherited Members
UserControl.OnCreateAutomationPeer()
ContentControl.ContentProperty
ContentControl.ContentTemplateProperty
ContentControl.HorizontalContentAlignmentProperty
ContentControl.VerticalContentAlignmentProperty
ContentControl.IContentPresenterHost.RegisterContentPresenter(ContentPresenter)
ContentControl.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
ContentControl.RegisterContentPresenter(ContentPresenter)
ContentControl.Content
ContentControl.ContentTemplate
ContentControl.Presenter
ContentControl.HorizontalContentAlignment
ContentControl.VerticalContentAlignment
ContentControl.IContentPresenterHost.LogicalChildren
TemplatedControl.BackgroundProperty
TemplatedControl.BackgroundSizingProperty
TemplatedControl.BorderBrushProperty
TemplatedControl.BorderThicknessProperty
TemplatedControl.CornerRadiusProperty
TemplatedControl.FontFamilyProperty
TemplatedControl.FontFeaturesProperty
TemplatedControl.FontSizeProperty
TemplatedControl.FontStyleProperty
TemplatedControl.FontWeightProperty
TemplatedControl.FontStretchProperty
TemplatedControl.ForegroundProperty
TemplatedControl.LetterSpacingProperty
TemplatedControl.PaddingProperty
TemplatedControl.TemplateProperty
TemplatedControl.IsTemplateFocusTargetProperty
TemplatedControl.TemplateAppliedEvent
TemplatedControl.GetIsTemplateFocusTarget(Control)
TemplatedControl.ApplyTemplate()
TemplatedControl.GetTemplateFocusTarget()
TemplatedControl.NotifyChildResourcesChanged(ResourcesChangedEventArgs)
TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
TemplatedControl.OnApplyTemplate(TemplateAppliedEventArgs)
TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)
TemplatedControl.OnControlThemeChanged()
TemplatedControl.Background
TemplatedControl.BackgroundSizing
TemplatedControl.BorderBrush
TemplatedControl.BorderThickness
TemplatedControl.CornerRadius
TemplatedControl.FontFamily
TemplatedControl.FontFeatures
TemplatedControl.FontSize
TemplatedControl.FontStyle
TemplatedControl.FontWeight
TemplatedControl.FontStretch
TemplatedControl.Foreground
TemplatedControl.LetterSpacing
TemplatedControl.Padding
TemplatedControl.Template
TemplatedControl.TemplateApplied
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.ISetterValue.Initialize(SetterBase)
Control.IVisualBrushInitialize.EnsureInitialized()
Control.OnLoaded(RoutedEventArgs)
Control.OnUnloaded(RoutedEventArgs)
Control.OnSizeChanged(SizeChangedEventArgs)
Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnGotFocus(FocusChangedEventArgs)
Control.OnLostFocus(FocusChangedEventArgs)
Control.OnPointerReleased(PointerReleasedEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.IDataTemplateHost.IsDataTemplatesInitialized
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.OnAccessKey(RoutedEventArgs)
InputElement.OnGettingFocus(FocusChangingEventArgs)
InputElement.OnLosingFocus(FocusChangingEventArgs)
InputElement.OnKeyDown(KeyEventArgs)
InputElement.OnTextInput(TextInputEventArgs)
InputElement.OnPointerEntered(PointerEventArgs)
InputElement.OnPointerExited(PointerEventArgs)
InputElement.OnPointerMoved(PointerEventArgs)
InputElement.OnPointerPressed(PointerPressedEventArgs)
InputElement.GetNextTabStopOverride()
InputElement.GetPreviousTabStopOverride()
InputElement.GetFirstFocusableElementOverride()
InputElement.GetLastFocusableElementOverride()
InputElement.OnPointerCaptureChanging(PointerCaptureChangingEventArgs)
InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
InputElement.OnTapped(TappedEventArgs)
InputElement.OnRightTapped(TappedEventArgs)
InputElement.OnDoubleTapped(TappedEventArgs)
InputElement.OnHolding(HoldingRoutedEventArgs)
InputElement.UpdateIsEffectivelyEnabled()
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.IsEnabledCore
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)
Interactive.BuildEventRoute(RoutedEvent)
Interactive.InteractiveParent
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.Measure(Size)
Layoutable.Arrange(Rect)
Layoutable.InvalidateMeasure()
Layoutable.InvalidateArrange()
Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
Layoutable.MeasureCore(Size)
Layoutable.MeasureOverride(Size)
Layoutable.ArrangeCore(Rect)
Layoutable.ArrangeOverride(Size)
Layoutable.OnMeasureInvalidated()
Layoutable.OnVisualParentChanged(Visual, Visual)
Layoutable.OnTemplatedParentControlThemeChanged()
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.CreateCompositionVisual(Compositor)
Visual.DetachFromCompositor()
Visual.SynchronizeCompositionChildVisuals()
Visual.SynchronizeCompositionProperties()
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.Render(DrawingContext)
Visual.AffectsRender<T>(params AvaloniaProperty[])
Visual.IAvaloniaListItemValidator<Visual>.Validate(Visual)
Visual.InvalidateMirrorTransform()
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.VisualChildren
Visual.VisualRoot
Visual.BypassFlowDirectionPolicies
Visual.AttachedToVisualTree
Visual.DetachedFromVisualTree
StyledElement.DataContextProperty
StyledElement.NameProperty
StyledElement.ParentProperty
StyledElement.TemplatedParentProperty
StyledElement.ThemeProperty
StyledElement.BeginInit()
StyledElement.EndInit()
StyledElement.ApplyStyling()
StyledElement.InitializeIfNeeded()
StyledElement.ILogical.NotifyAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.ILogical.NotifyDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.ILogical.NotifyResourcesChanged(ResourcesChangedEventArgs)
StyledElement.IResourceHost.NotifyHostedResourcesChanged(ResourcesChangedEventArgs)
StyledElement.ISetLogicalParent.SetParent(ILogical)
StyledElement.ISetInheritanceParent.SetParent(AvaloniaObject)
StyledElement.OnDataContextBeginUpdate()
StyledElement.OnDataContextEndUpdate()
StyledElement.OnInitialized()
StyledElement.IAvaloniaListItemValidator<ILogical>.Validate(ILogical)
StyledElement.Name
StyledElement.Classes
StyledElement.DataContext
StyledElement.IsInitialized
StyledElement.Styles
StyledElement.StyleKey
StyledElement.Resources
StyledElement.TemplatedParent
StyledElement.Theme
StyledElement.LogicalChildren
StyledElement.PseudoClasses
StyledElement.StyleKeyOverride
StyledElement.ILogical.IsAttachedToLogicalTree
StyledElement.Parent
StyledElement.ActualThemeVariant
StyledElement.ILogical.LogicalParent
StyledElement.ILogical.LogicalChildren
StyledElement.IResourceNode.HasResources
StyledElement.IStyleHost.IsStylesInitialized
StyledElement.IStyleHost.StylingParent
StyledElement.AttachedToLogicalTree
StyledElement.DetachedFromLogicalTree
StyledElement.DataContextChanged
StyledElement.Initialized
StyledElement.ResourcesChanged
StyledElement.ActualThemeVariantChanged
Animatable.TransitionsProperty
Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
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.IAvaloniaObjectDebug.GetPropertyChangedSubscribers()
AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
AvaloniaObject.InheritanceParent
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.Dispatcher
AvaloniaObject.PropertyChanged
Namespace: MOSAIC.Views
Assembly: MOSAIC.dll
Syntax
public class MainView : UserControl, IAvaloniaObjectDebug, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IAvaloniaListItemValidator<ILogical>, IAvaloniaListItemValidator<Visual>, IInputElement, IDataTemplateHost, IVisualBrushInitialize, ISetterValue, IContentControl, IContentPresenterHost

Constructors

MainView()

Declaration
public MainView()

MainView(IBlockFactory)

Declaration
public MainView(IBlockFactory factory)
Parameters
Type Name Description
IBlockFactory factory

MainView(IBlockFactory, RecordingService, IFilePickerService)

The constructor the container actually picks, and therefore the one that has to carry every service this view uses.

Declaration
public MainView(IBlockFactory factory, RecordingService recording, IFilePickerService picker)
Parameters
Type Name Description
IBlockFactory factory
RecordingService recording
IFilePickerService picker
Remarks

Microsoft.Extensions.DependencyInjection selects the greediest constructor whose parameters it can all resolve, so adding a service to the parameterless overload above has no effect in the running app — the recording controls stayed dead that way. Anything new belongs here.

Fields

BuildingComponents

Declaration
internal BuildingComponentsPanel BuildingComponents
Field Value
Type Description
BuildingComponentsPanel

DesktopHeader

Declaration
internal Border DesktopHeader
Field Value
Type Description
Border

Drawer

Declaration
internal SplitView Drawer
Field Value
Type Description
SplitView

FabClearanceWithLog

Height of LogPanelView plus the FAB's own bottom margin.

Declaration
private const double FabClearanceWithLog = 244
Field Value
Type Description
double

FabClearanceWithoutLog

Declaration
private const double FabClearanceWithoutLog = 24
Field Value
Type Description
double

Graph

Declaration
internal GraphCanvas Graph
Field Value
Type Description
GraphCanvas

GridStyleComboBox

Declaration
internal ComboBox GridStyleComboBox
Field Value
Type Description
ComboBox

LogPanel

Declaration
internal LogPanelView LogPanel
Field Value
Type Description
LogPanelView

LogToggleButton

Declaration
internal Button LogToggleButton
Field Value
Type Description
Button

MonitorFab

Declaration
internal Button MonitorFab
Field Value
Type Description
Button

MoonIcon

Declaration
internal Viewbox MoonIcon
Field Value
Type Description
Viewbox

OpenConfigButton

Declaration
internal Button OpenConfigButton
Field Value
Type Description
Button

RecordingFolderButton

Declaration
internal Button RecordingFolderButton
Field Value
Type Description
Button

RecordingFolderDot

Declaration
internal Ellipse RecordingFolderDot
Field Value
Type Description
Ellipse

RecordingFolderText

Declaration
internal TextBlock RecordingFolderText
Field Value
Type Description
TextBlock

ResizeGrip

Declaration
internal Thumb ResizeGrip
Field Value
Type Description
Thumb

ResizeThrottleMs

Declaration
private const double ResizeThrottleMs = 16
Field Value
Type Description
double

RightDrawer

Declaration
internal SplitView RightDrawer
Field Value
Type Description
SplitView

RightDrawerButton

Declaration
internal Button RightDrawerButton
Field Value
Type Description
Button

Root

Declaration
internal UserControl Root
Field Value
Type Description
UserControl

SunIcon

Declaration
internal Viewbox SunIcon
Field Value
Type Description
Viewbox

ThemeToggleButton

Declaration
internal Button ThemeToggleButton
Field Value
Type Description
Button

_factory

Declaration
private readonly IBlockFactory _factory
Field Value
Type Description
IBlockFactory

_lastResizeUpdate

Declaration
private DateTime _lastResizeUpdate
Field Value
Type Description
DateTime

_mobileLayoutConfigured

Declaration
private bool _mobileLayoutConfigured
Field Value
Type Description
bool

_monitorFab

Declaration
private Button? _monitorFab
Field Value
Type Description
Button

_monitorSyncQueued

Declaration
private bool _monitorSyncQueued
Field Value
Type Description
bool

_monitorWindow

Declaration
private ScopeMonitorWindow? _monitorWindow
Field Value
Type Description
ScopeMonitorWindow

_moonIcon

Declaration
private Viewbox? _moonIcon
Field Value
Type Description
Viewbox

_picker

Declaration
private readonly IFilePickerService? _picker
Field Value
Type Description
IFilePickerService

_pipeline

Declaration
private readonly PipelineSession _pipeline
Field Value
Type Description
PipelineSession

_pipelineGate

Declaration
private readonly SemaphoreSlim _pipelineGate
Field Value
Type Description
SemaphoreSlim

_recording

Declaration
private readonly RecordingService? _recording
Field Value
Type Description
RecordingService

_resizeResumeTimer

Declaration
private DispatcherTimer? _resizeResumeTimer
Field Value
Type Description
DispatcherTimer

_shuttingDown

Declaration
private bool _shuttingDown
Field Value
Type Description
bool

_sunIcon

Declaration
private Viewbox? _sunIcon
Field Value
Type Description
Viewbox

_vizSuspendedForResize

Declaration
private bool _vizSuspendedForResize
Field Value
Type Description
bool

Properties

Blocks

Declaration
public ObservableCollection<object> Blocks { get; }
Property Value
Type Description
ObservableCollection<object>

CanOpenMonitorWindow

Declaration
private bool CanOpenMonitorWindow { get; }
Property Value
Type Description
bool

Vertices

Declaration
public ObservableCollection<VertexViewModel> Vertices { get; }
Property Value
Type Description
ObservableCollection<VertexViewModel>

Methods

ChooseRecordingFolderAsync()

Declaration
public Task ChooseRecordingFolderAsync()
Returns
Type Description
Task

CollectChildren(BaseBlock, HashSet<BaseBlock>)

Recursively collects a block and all its children (blocks that use this block as input). In the graph structure, Neighbors contains parent/input blocks, so children are vertices that have this block in their Neighbors list.

Declaration
private void CollectChildren(BaseBlock block, HashSet<BaseBlock> collected)
Parameters
Type Name Description
BaseBlock block
HashSet<BaseBlock> collected

ConfigureForMobile()

Switches this reusable pipeline workspace to overlay panes and removes the desktop toolbar. MobileMainView supplies touch-sized Android/iOS navigation around it.

Declaration
public void ConfigureForMobile()

ExamplesFolderAsync(TopLevel)

The example pipelines deployed under Assets\Examples, or null when they were not deployed.

Declaration
private static Task<IStorageFolder?> ExamplesFolderAsync(TopLevel top)
Parameters
Type Name Description
TopLevel top
Returns
Type Description
Task<IStorageFolder>
Remarks

Without this the picker opens wherever the OS last left it, and the shipped examples are only findable by knowing the source tree. Null is a fine answer — the picker then behaves exactly as it did before.

ExpandAndScrollToBlock(object)

Declaration
private void ExpandAndScrollToBlock(object block)
Parameters
Type Name Description
object block

InitializeComponent(bool)

Wires up the controls and optionally loads XAML markup and attaches dev tools (if Avalonia.Diagnostics package is referenced).

Declaration
[ExcludeFromCodeCoverage]
public void InitializeComponent(bool loadXaml = true)
Parameters
Type Name Description
bool loadXaml

Should the XAML be loaded into the component.

LoadConfigModelsAsync(IReadOnlyDictionary<string, JsonModel>)

Declaration
private Task LoadConfigModelsAsync(IReadOnlyDictionary<string, JsonModel> models)
Parameters
Type Name Description
IReadOnlyDictionary<string, JsonModel> models
Returns
Type Description
Task

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
Avalonia.Visual.OnAttachedToVisualTree(Avalonia.VisualTreeAttachmentEventArgs)

OnBlockDeleteRequested(object?, RoutedEventArgs)

Declaration
private void OnBlockDeleteRequested(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnBlockDescriptorDropped(object?, (BlockDescriptor Descriptor, Point CanvasPosition))

A block was dragged from the palette and dropped on the canvas: ask the user to name/configure it, then instantiate it via the factory and add it to the graph at the drop point. Inputs are wired afterwards on the canvas by dragging output→input ports (see OnConnectionCreated(object?, (VertexViewModel Source, VertexViewModel Target))).

Declaration
private void OnBlockDescriptorDropped(object? sender, (BlockDescriptor Descriptor, Point CanvasPosition) e)
Parameters
Type Name Description
object sender
(BlockDescriptor Descriptor, Point CanvasPosition) e

OnBlocksChanged(object?, NotifyCollectionChangedEventArgs)

Declaration
private void OnBlocksChanged(object? sender, NotifyCollectionChangedEventArgs e)
Parameters
Type Name Description
object sender
NotifyCollectionChangedEventArgs e

OnBuildingComponentsCloseRequested(object?, EventArgs)

Declaration
private void OnBuildingComponentsCloseRequested(object? sender, EventArgs e)
Parameters
Type Name Description
object sender
EventArgs e

OnBuildingComponentsResizeDrag(object?, VectorEventArgs)

Declaration
private void OnBuildingComponentsResizeDrag(object? sender, VectorEventArgs e)
Parameters
Type Name Description
object sender
VectorEventArgs e

OnConnectionCreated(object?, (VertexViewModel Source, VertexViewModel Target))

The user drew a wire from Source's output to Target's input in the graph. The canvas already validated it (capacity / accepted type / no cycle); here we make it real: subscribe the target to the source publisher, record the graph edge, and persist the input name.

Declaration
private void OnConnectionCreated(object? sender, (VertexViewModel Source, VertexViewModel Target) e)
Parameters
Type Name Description
object sender
(VertexViewModel Source, VertexViewModel Target) 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)

OnGridStyleChanged(object?, SelectionChangedEventArgs)

Declaration
private void OnGridStyleChanged(object? sender, SelectionChangedEventArgs e)
Parameters
Type Name Description
object sender
SelectionChangedEventArgs e

OnGroupCreated(object?, VertexGroupViewModel)

When blocks are grouped in the graph, replace their individual cards in the flyout with a single collapsible group card.

Declaration
private void OnGroupCreated(object? sender, VertexGroupViewModel group)
Parameters
Type Name Description
object sender
VertexGroupViewModel group

OnGroupRemoved(object?, VertexGroupViewModel)

When a group is dissolved, remove the group card and re-insert the individual member block cards at the same position.

Declaration
private void OnGroupRemoved(object? sender, VertexGroupViewModel group)
Parameters
Type Name Description
object sender
VertexGroupViewModel group

OnHamburgerClicked(object?, RoutedEventArgs)

Declaration
private void OnHamburgerClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnLogPanelCloseRequested(object?, EventArgs)

Declaration
private void OnLogPanelCloseRequested(object? sender, EventArgs e)
Parameters
Type Name Description
object sender
EventArgs e

OnLogToggleClicked(object?, RoutedEventArgs)

Declaration
private void OnLogToggleClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnMonitorFabClicked(object?, RoutedEventArgs)

Declaration
private void OnMonitorFabClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnNodeClicked(object?, VertexViewModel)

Declaration
private void OnNodeClicked(object? sender, VertexViewModel vertex)
Parameters
Type Name Description
object sender
VertexViewModel vertex

OnOpenConfigClicked(object?, RoutedEventArgs)

Declaration
private void OnOpenConfigClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnRecordingFolderClicked(object?, RoutedEventArgs)

Picks the one folder every recording writes into. Blocks then only carry an on/off switch, which is what makes recording usable from the palette — no path to retype per block.

Declaration
private void OnRecordingFolderClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnResizeDragDelta(object?, VectorEventArgs)

Declaration
private void OnResizeDragDelta(object? sender, VectorEventArgs e)
Parameters
Type Name Description
object sender
VectorEventArgs e

OnRightDrawerClicked(object?, RoutedEventArgs)

Declaration
private void OnRightDrawerClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OnThemeChanged(object?, AppTheme)

Declaration
private void OnThemeChanged(object? sender, AppTheme theme)
Parameters
Type Name Description
object sender
AppTheme theme

OnThemeToggleClicked(object?, RoutedEventArgs)

Declaration
private void OnThemeToggleClicked(object? sender, RoutedEventArgs e)
Parameters
Type Name Description
object sender
RoutedEventArgs e

OpenConfigAsync()

Opens a config file using file picker dialog.

Declaration
public Task<string?> OpenConfigAsync()
Returns
Type Description
Task<string>

OpenConfigFileAsync(string)

Opens a specific config file by path (used by recent files menu).

Declaration
public Task<string?> OpenConfigFileAsync(string filePath)
Parameters
Type Name Description
string filePath
Returns
Type Description
Task<string>

PickAndLoadConfigAsync(CancellationToken)

Declaration
private Task<(IReadOnlyDictionary<string, JsonModel> models, string filePath)?> PickAndLoadConfigAsync(CancellationToken ct = default)
Parameters
Type Name Description
CancellationToken ct
Returns
Type Description
Task<(IReadOnlyDictionary<string, JsonModel> models, string filePath)?>

RefreshMonitorWindow()

If a scope-monitor window is open, rebind it to the current block set so blocks added or removed while it is open are reflected. When no scope-capable blocks remain the window shows its empty-state placeholder rather than closing (it was opened explicitly by the user).

Declaration
private void RefreshMonitorWindow()

ShowErrorAsync(string, string)

Declaration
private Task ShowErrorAsync(string title, string message)
Parameters
Type Name Description
string title
string message
Returns
Type Description
Task

ShowMobileCanvas()

Declaration
public void ShowMobileCanvas()

ShutdownAsync()

Releases the active pipeline before the desktop window finishes closing.

Declaration
public Task ShutdownAsync()
Returns
Type Description
Task

SuspendVizDuringResize()

Declaration
private void SuspendVizDuringResize()

ToggleMobileBlocks()

Declaration
public void ToggleMobileBlocks()

ToggleMobileLog()

Declaration
public void ToggleMobileLog()

ToggleMobilePalette()

Declaration
public void ToggleMobilePalette()

UpdateFabClearance()

Lifts the scope-monitor FAB clear of the log strip.

Declaration
private void UpdateFabClearance()
Remarks

The FAB lives in the outer Panel at ZIndex 100, so it is not laid out by the grid the log strip is a row of and would otherwise float on top of the newest rows — exactly the ones being read.

UpdateFabVisibility()

Declaration
private void UpdateFabVisibility()

UpdateMobilePaneWidths()

Declaration
private void UpdateMobilePaneWidths()

UpdateRecordingFolderDisplay()

Shows the chosen folder's leaf name on the header button, full path in its tooltip.

Declaration
private void UpdateRecordingFolderDisplay()
Remarks

The dot is dimmed until a folder is set, so the header answers "can anything record right now?" without being read word by word.

UpdateThemeIcon(AppTheme)

Declaration
private void UpdateThemeIcon(AppTheme theme)
Parameters
Type Name Description
AppTheme theme

WireBlockCollection()

Subscribes to Blocks so the scope-monitor FAB and any open monitor window follow blocks being added and removed.

Declaration
private void WireBlockCollection()
Remarks

Both construction paths call this method exactly once. The service-provider constructor chains to the parameterless constructor, preventing duplicate collection subscriptions.

Implements

Avalonia.Diagnostics.IAvaloniaObjectDebug
INotifyPropertyChanged
Avalonia.IDataContextProvider
Avalonia.LogicalTree.ILogical
Avalonia.Styling.IThemeVariantHost
Avalonia.Controls.IResourceHost
Avalonia.Controls.IResourceNode
Avalonia.Styling.IStyleHost
Avalonia.Controls.ISetLogicalParent
Avalonia.Controls.ISetInheritanceParent
ISupportInitialize
Avalonia.INamed
Avalonia.Collections.IAvaloniaListItemValidator<T>
Avalonia.Collections.IAvaloniaListItemValidator<T>
Avalonia.Input.IInputElement
Avalonia.Controls.Templates.IDataTemplateHost
Avalonia.Rendering.IVisualBrushInitialize
Avalonia.Styling.ISetterValue
Avalonia.Controls.IContentControl
Avalonia.Controls.Presenters.IContentPresenterHost

Search documentation

Start typing to search the documentation.