Class ScopeMonitorView

Hosts a ScottPlot ScottPlot.Avalonia.AvaPlot bound to a ScopeMonitor. The shared attach/detach, theme, and rebuild lifecycle lives in MonitorViewBase<TMonitor>; this class supplies the ScottPlot surface (created fresh on attach and wired through AttachPlot(Plot, Action)) and the stacked/overlapped view-mode toggle.

Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
TemplatedControl
ContentControl
UserControl
ScopeMonitorView
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.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.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
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.Visualization.ScopeMonitor
Assembly: MOSAIC.dll
Syntax
public class ScopeMonitorView : MonitorViewBase<ScopeMonitor>, IAvaloniaObjectDebug, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IAvaloniaListItemValidator<ILogical>, IAvaloniaListItemValidator<Visual>, IInputElement, IDataTemplateHost, IVisualBrushInitialize, ISetterValue, IContentControl, IContentPresenterHost

Constructors

ScopeMonitorView()

Creates the view and builds its static layout.

Declaration
public ScopeMonitorView()

Fields

ScopeProperty

Identifies the Scope styled property.

Declaration
public static readonly StyledProperty<object?> ScopeProperty
Field Value
Type Description
StyledProperty<object>

ShowViewModeToggleProperty

Identifies the ShowViewModeToggle styled property.

Declaration
public static readonly StyledProperty<bool> ShowViewModeToggleProperty
Field Value
Type Description
StyledProperty<bool>

_avaPlot

Declaration
private AvaPlot? _avaPlot
Field Value
Type Description
AvaPlot

_chartContainer

Declaration
private Border? _chartContainer
Field Value
Type Description
Border

_gearButton

Declaration
private Button? _gearButton
Field Value
Type Description
Button

_settingsFlyout

Declaration
private VisualizationSettingsFlyout? _settingsFlyout
Field Value
Type Description
VisualizationSettingsFlyout

_suppressToggleHandler

Declaration
private bool _suppressToggleHandler
Field Value
Type Description
bool

_viewModeToggle

Declaration
private ToggleSwitch? _viewModeToggle
Field Value
Type Description
ToggleSwitch

Properties

Scope

The ScopeMonitor whose channels this control displays.

Declaration
public object? Scope { get; set; }
Property Value
Type Description
object

ShowViewModeToggle

Whether the stacked/overlapped view-mode toggle is shown.

Declaration
public bool ShowViewModeToggle { get; set; }
Property Value
Type Description
bool

Methods

ApplyTheme()

Applies the active theme to view-owned chrome (e.g. container background).

Declaration
protected override void ApplyTheme()
Overrides
MonitorViewBase<ScopeMonitor>.ApplyTheme()

CreateLayout()

Declaration
private void CreateLayout()

CreateSurface()

Builds the rendering surface for the current Monitor and adds it to the view. Called only while the view is attached and a monitor is set.

Declaration
protected override void CreateSurface()
Overrides
MonitorViewBase<ScopeMonitor>.CreateSurface()

DestroySurface()

Tears down the rendering surface. Must be safe to call when none exists.

Declaration
protected override void DestroySurface()
Overrides
MonitorViewBase<ScopeMonitor>.DestroySurface()

DisableZoom(AvaPlot)

Removes every zoom interaction from the plot's input processor — scroll-wheel zoom, right-drag zoom, middle-drag zoom-rectangle, and keyboard pan/zoom — while leaving panning intact. The scope drives its own X/Y limits, so user zoom only fights the live auto-scaling.

Declaration
private static void DisableZoom(AvaPlot plot)
Parameters
Type Name Description
AvaPlot plot

OnMonitorAssigned(ScopeMonitor?, ScopeMonitor?)

Called after Monitor changes, before any rebuild. Override to wire per-view concerns such as a settings flyout or a mode toggle.

Declaration
protected override void OnMonitorAssigned(ScopeMonitor? oldMonitor, ScopeMonitor? newMonitor)
Parameters
Type Name Description
ScopeMonitor oldMonitor
ScopeMonitor newMonitor
Overrides
MonitorViewBase<ScopeMonitor>.OnMonitorAssigned(ScopeMonitor, ScopeMonitor)

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

Declaration
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
Type Name Description
AvaloniaPropertyChangedEventArgs change

The property change details.

Overrides
Avalonia.Controls.ContentControl.OnPropertyChanged(Avalonia.AvaloniaPropertyChangedEventArgs)

OnViewModeToggled(object?, RoutedEventArgs)

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

SyncViewModeToggle()

Declaration
private void SyncViewModeToggle()

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.