Table of Contents

Class VideoView

Namespace
VisioForge.Core.UI.Avalonia
Assembly
VisioForge.Core.UI.Avalonia.dll

VideoView control for Avalonia UI framework that provides cross-platform video rendering capabilities. This control serves as a container for native video rendering on different platforms (Windows, Android, iOS).

public class VideoView : Panel, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider, IVideoView, IDisposable

Inheritance

AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
Panel

Implements

IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
IStyleable
INamed
IInputElement
IDataTemplateHost
ISetterValue
IChildIndexProvider
IVideoView

Inherited Members

Panel.BackgroundProperty
Panel.Render(DrawingContext)
Panel.AffectsParentArrange<TPanel>(params AvaloniaProperty[])
Panel.AffectsParentMeasure<TPanel>(params AvaloniaProperty[])
Panel.ChildrenChanged(object?, NotifyCollectionChangedEventArgs)
Panel.IChildIndexProvider.GetChildIndex(ILogical)
Panel.IChildIndexProvider.TryGetTotalCount(out int)
Panel.Children
Panel.Background
Panel.IsItemsHost
Panel.IChildIndexProvider.ChildIndexChanged
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.ContextRequestedEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.ISetterValue.Initialize(SetterBase)
Control.GetTemplateFocusTarget()
Control.OnLoaded(RoutedEventArgs)
Control.OnUnloaded(RoutedEventArgs)
Control.OnSizeChanged(SizeChangedEventArgs)
Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnGotFocus(GotFocusEventArgs)
Control.OnLostFocus(RoutedEventArgs)
Control.OnCreateAutomationPeer()
Control.OnPointerReleased(PointerReleasedEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.IDataTemplateHost.IsDataTemplatesInitialized
Control.ContextRequested
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.LostFocusEvent
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.TappedEvent
InputElement.HoldingEvent
InputElement.DoubleTappedEvent
InputElement.Focus(NavigationMethod, KeyModifiers)
InputElement.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
InputElement.OnAccessKey(RoutedEventArgs)
InputElement.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
InputElement.OnGotFocus(GotFocusEventArgs)
InputElement.OnLostFocus(RoutedEventArgs)
InputElement.OnKeyDown(KeyEventArgs)
InputElement.OnKeyUp(KeyEventArgs)
InputElement.OnTextInput(TextInputEventArgs)
InputElement.OnPointerEntered(PointerEventArgs)
InputElement.OnPointerExited(PointerEventArgs)
InputElement.OnPointerMoved(PointerEventArgs)
InputElement.OnPointerPressed(PointerPressedEventArgs)
InputElement.OnPointerReleased(PointerReleasedEventArgs)
InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
InputElement.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
InputElement.UpdateIsEffectivelyEnabled()
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.LostFocus
InputElement.KeyDown
InputElement.KeyUp
InputElement.TextInput
InputElement.TextInputMethodClientRequested
InputElement.PointerEntered
InputElement.PointerExited
InputElement.PointerMoved
InputElement.PointerPressed
InputElement.PointerReleased
InputElement.PointerCaptureLost
InputElement.PointerWheelChanged
InputElement.Tapped
InputElement.Holding
InputElement.DoubleTapped
Interactive.AddHandler(RoutedEvent, Delegate, RoutingStrategies, bool)
Interactive.AddHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>?, RoutingStrategies, bool)
Interactive.RemoveHandler(RoutedEvent, Delegate)
Interactive.RemoveHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>?)
Interactive.RaiseEvent(RoutedEventArgs)
Interactive.BuildEventRoute(RoutedEvent)
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.AffectsMeasure<T>(params AvaloniaProperty[])
Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
Layoutable.MeasureCore(Size)
Layoutable.MeasureOverride(Size)
Layoutable.ArrangeCore(Rect)
Layoutable.ArrangeOverride(Size)
Layoutable.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Layoutable.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Layoutable.OnMeasureInvalidated()
Layoutable.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Layoutable.OnVisualParentChanged(Visual?, Visual?)
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.EffectProperty
Visual.HasMirrorTransformProperty
Visual.RenderTransformProperty
Visual.RenderTransformOriginProperty
Visual.FlowDirectionProperty
Visual.VisualParentProperty
Visual.ZIndexProperty
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.Render(DrawingContext)
Visual.AffectsRender<T>(params AvaloniaProperty[])
Visual.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Visual.LogicalChildrenCollectionChanged(object?, NotifyCollectionChangedEventArgs)
Visual.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Visual.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
Visual.OnVisualParentChanged(Visual?, Visual?)
Visual.InvalidateMirrorTransform()
Visual.Bounds
Visual.ClipToBounds
Visual.Clip
Visual.IsEffectivelyVisible
Visual.IsVisible
Visual.Opacity
Visual.OpacityMask
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.TryGetResource(object, ThemeVariant?, out object?)
StyledElement.ISetLogicalParent.SetParent(ILogical?)
StyledElement.ISetInheritanceParent.SetParent(AvaloniaObject?)
StyledElement.IStyleHost.StylesAdded(IReadOnlyList<IStyle>)
StyledElement.IStyleHost.StylesRemoved(IReadOnlyList<IStyle>)
StyledElement.LogicalChildrenCollectionChanged(object?, NotifyCollectionChangedEventArgs)
StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDataContextChanged(EventArgs)
StyledElement.OnDataContextBeginUpdate()
StyledElement.OnDataContextEndUpdate()
StyledElement.OnInitialized()
StyledElement.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
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.IStyleable.Classes
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.Equals(object?)
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(AvaloniaProperty, object?, BindingPriority)
AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
AvaloniaObject.SetCurrentValue(AvaloniaProperty, object?)
AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
AvaloniaObject.Bind(AvaloniaProperty, IBinding)
AvaloniaObject.Bind(AvaloniaProperty, IObservable<object?>, BindingPriority)
AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<object?>, BindingPriority)
AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority)
AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<BindingValue<T>>, BindingPriority)
AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<object?>)
AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<T>)
AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>)
AvaloniaObject.CoerceValue(AvaloniaProperty)
AvaloniaObject.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception?)
AvaloniaObject.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
AvaloniaObject.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
AvaloniaObject.InheritanceParent
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.PropertyChanged
AvaloniaObject.INotifyPropertyChanged.PropertyChanged

Constructors

VideoView()

Initializes a new instance of the VisioForge.Core.UI.Avalonia.VideoView class. Sets up the native control host, default size, and background color for video rendering.

public VideoView()

Methods

AttachPipeline(MediaBlocksPipeline)

Attaches a media blocks pipeline to the video view for processing. This method is not implemented in the current version.

public void AttachPipeline(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The media blocks pipeline to attach.

CallInvoke(Delegate, params object[])

Invokes a delegate method with optional arguments. This method is provided for API compatibility but has no implementation in Avalonia.

public void CallInvoke(Delegate method, params object[] args)

Parameters

method Delegate

The delegate method to invoke.

args object[]

Optional arguments to pass to the method.

CallRefresh()

Calls a refresh operation on the video view. This method is provided for API compatibility but has no implementation in Avalonia.

public void CallRefresh()

ClearUI()

Clears the user interface elements of the video view. This method is provided for API compatibility but has no implementation.

public void ClearUI()

DetachPipeline()

Detaches the currently attached media blocks pipeline from the video view. This method is not implemented in the current version.

public void DetachPipeline()

Dispose(bool)

Releases unmanaged and optionally managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Set to true to release both managed and unmanaged resources; false to release only unmanaged resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Implements the IDisposable pattern for proper cleanup.

public void Dispose()

~VideoView()

Finalizes an instance of the VisioForge.Core.UI.Avalonia.VideoView class.

protected ~VideoView()

GetBackgroundColor()

Gets the background color of the video view as an SKColor.

public SKColor GetBackgroundColor()

Returns

SKColor

The background SkiaSharp.SKColor, or black if no background is set.

GetHandle()

Gets the native window handle if available for the current platform. On Android and iOS, this returns IntPtr.Zero as those platforms don't expose window handles.

public nint GetHandle()

Returns

nint

The native window handle as IntPtr, or IntPtr.Zero if not available.

GetInvokeRequired()

Gets a value indicating whether the caller must use Invoke when calling methods on the control. In Avalonia, this always returns false as thread marshaling is handled differently.

public bool GetInvokeRequired()

Returns

bool

Always returns false in Avalonia.

GetIsHandleCreated()

Gets a value indicating whether the native window handle has been created.

public bool GetIsHandleCreated()

Returns

bool

true if the handle is created and valid; otherwise, false.

GetSize()

Gets the actual size of the video view control in device-independent pixels. On Windows, this accounts for DPI scaling to return the physical size.

public Size GetSize()

Returns

Size

A VisioForge.Core.Types.Size structure containing the width and height.

GetUIEngine()

Gets the UI engine type used for video rendering. Returns platform-specific engine: Android_TextureView on Android, Apple_Metal on iOS, or Avalonia on other platforms.

public VideoViewUIEngine GetUIEngine()

Returns

VideoViewUIEngine

The VisioForge.Core.Types.VideoViewUIEngine enum value indicating the rendering engine in use.

InvokeStart()

Invokes the start operation by adding the native control host to the visual tree. Called when video playback or capture is about to begin.

public void InvokeStart()

InvokeStartComplete()

Invokes operations to complete the start process. This method is intentionally left empty as no additional operations are required.

public void InvokeStartComplete()

InvokeStop()

Invokes the stop operation by removing the native control host from the visual tree. Called when video playback or capture is stopping.

public void InvokeStop()

InvokeVideoRendererUpdate()

Invokes a video renderer update operation. This method is intentionally left empty as the Avalonia implementation handles updates automatically.

public void InvokeVideoRendererUpdate()

LogDialogClear()

Clears the contents of the log dialog. This method is provided for API compatibility but has no implementation in Avalonia.

public void LogDialogClear()

LogDialogClose()

Closes the log dialog window. This method is provided for API compatibility but has no implementation in Avalonia.

public void LogDialogClose()

LogDialogError(string)

Logs an error message to the dialog. This method is provided for API compatibility but has no implementation in Avalonia.

public void LogDialogError(string msg)

Parameters

msg string

The error message to log.

PushMouseButtonDown(int, int, MouseButton)

Raises the OnMouseButtonDown event with the specified coordinates and button.

public void PushMouseButtonDown(int x, int y, MouseButton button)

Parameters

x int

The X coordinate of the mouse pointer in pixels.

y int

The Y coordinate of the mouse pointer in pixels.

button MouseButton

The mouse button that was pressed.

PushMouseButtonUp(int, int, MouseButton)

Raises the OnMouseButtonUp event with the specified coordinates and button.

public void PushMouseButtonUp(int x, int y, MouseButton button)

Parameters

x int

The X coordinate of the mouse pointer in pixels.

y int

The Y coordinate of the mouse pointer in pixels.

button MouseButton

The mouse button that was released.

PushMouseMove(int, int)

Raises the OnMouseMoved event with the specified mouse coordinates.

public void PushMouseMove(int x, int y)

Parameters

x int

The X coordinate of the mouse pointer in pixels.

y int

The Y coordinate of the mouse pointer in pixels.

Refresh()

Refreshes the control's visual state. This method is provided for API compatibility but has no implementation in the Avalonia version.

public void Refresh()

ResizeRoundTo(int)

Resizes the video view to be a multiple of the specified value. This method is provided for API compatibility but has no implementation in Avalonia.

public void ResizeRoundTo(int round)

Parameters

round int

The value to round the dimensions to.

SetHandle(nint)

Sets the native window handle for the video view. This method is not implemented in the Avalonia version as handles are managed internally.

public void SetHandle(nint handle)

Parameters

handle nint

The native window handle to set.

Exceptions

NotImplementedException

Always thrown as this operation is not supported.

ShowMessage(string)

Shows a message dialog to the user. In the current implementation, this always returns OK without displaying a dialog.

public MessageBoxResult ShowMessage(string message)

Parameters

message string

The message text to display.

Returns

MessageBoxResult

Always returns VisioForge.Core.Types.MessageBoxResult.OK.

ShowMessageEx(string, string, MessageBoxDialogButtons)

Shows an extended message dialog with custom caption and button configuration.

public MessageBoxResult ShowMessageEx(string message, string caption, MessageBoxDialogButtons buttons)

Parameters

message string

The message text to display.

caption string

The dialog window caption/title.

buttons MessageBoxDialogButtons

The button configuration to display in the dialog.

Returns

MessageBoxResult

The VisioForge.Core.Types.MessageBoxResult indicating which button was clicked.

OnMouseButtonDown

Occurs when a mouse button is pressed down over the video view.

public event EventHandler<MouseButtonEventArgs> OnMouseButtonDown

Event Type

EventHandler<MouseButtonEventArgs>

OnMouseButtonUp

Occurs when a mouse button is released over the video view.

public event EventHandler<MouseButtonEventArgs> OnMouseButtonUp

Event Type

EventHandler<MouseButtonEventArgs>

OnMouseMoved

Occurs when the mouse pointer moves over the video view.

public event EventHandler<MouseMoveEventArgs> OnMouseMoved

Event Type

EventHandler<MouseMoveEventArgs>