Skip to main content

Class VelloView

Namespace: VelloSharp.Maui.Controls
Assembly: VelloSharp.Maui.Core.dll

MAUI surface that exposes Vello rendering hooks to platform handlers.

public class VelloView : View, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IVelloView, IView, IElement, ITransform

Inheritance

objectBindableObjectElementNavigableElementVisualElementViewVelloView

Implements

INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IVelloView, IView, IElement, ITransform

Inherited Members

View.VerticalOptionsProperty, View.HorizontalOptionsProperty, View.MarginProperty, View.propertyMapper, View.ChangeVisualState(), View.GetChildElements(Point), View.OnBindingContextChanged(), View.GetRendererOverrides<T>(), View.GestureController, View.GestureRecognizers, View.HorizontalOptions, View.Margin, View.VerticalOptions, VisualElement.NavigationProperty, VisualElement.StyleProperty, VisualElement.InputTransparentProperty, VisualElement.IsEnabledProperty, VisualElement.XProperty, VisualElement.YProperty, VisualElement.AnchorXProperty, VisualElement.AnchorYProperty, VisualElement.TranslationXProperty, VisualElement.TranslationYProperty, VisualElement.WidthProperty, VisualElement.HeightProperty, VisualElement.RotationProperty, VisualElement.RotationXProperty, VisualElement.RotationYProperty, VisualElement.ScaleProperty, VisualElement.ScaleXProperty, VisualElement.ScaleYProperty, VisualElement.ClipProperty, VisualElement.VisualProperty, VisualElement.IsVisibleProperty, VisualElement.OpacityProperty, VisualElement.BackgroundColorProperty, VisualElement.BackgroundProperty, VisualElement.BehaviorsProperty, VisualElement.TriggersProperty, VisualElement.WidthRequestProperty, VisualElement.HeightRequestProperty, VisualElement.MinimumWidthRequestProperty, VisualElement.MinimumHeightRequestProperty, VisualElement.MaximumWidthRequestProperty, VisualElement.MaximumHeightRequestProperty, VisualElement.IsFocusedProperty, VisualElement.FlowDirectionProperty, VisualElement.WindowProperty, VisualElement.ShadowProperty, VisualElement.ZIndexProperty, VisualElement.ControlsVisualElementMapper, VisualElement.BatchBegin(), VisualElement.BatchCommit(), VisualElement.Focus(), VisualElement.Measure(double, double, MeasureFlags), VisualElement.Unfocus(), VisualElement.InvalidateMeasure(), VisualElement.OnBindingContextChanged(), VisualElement.OnChildAdded(Element), VisualElement.OnChildRemoved(Element, int), VisualElement.OnChildrenReordered(), VisualElement.OnMeasure(double, double), VisualElement.OnSizeAllocated(double, double), VisualElement.SizeAllocated(double, double), VisualElement.ChangeVisualState(), VisualElement.RefreshIsEnabledProperty(), VisualElement.Arrange(Rect), VisualElement.ArrangeOverride(Rect), VisualElement.Layout(Rect), VisualElement.InvalidateMeasureOverride(), VisualElement.MeasureOverride(double, double), VisualElement.MapBackgroundColor(IViewHandler, IView), VisualElement.MapBackgroundImageSource(IViewHandler, IView), VisualElement.Visual, VisualElement.FlowDirection, VisualElement.Window, VisualElement.AnchorX, VisualElement.AnchorY, VisualElement.BackgroundColor, VisualElement.Background, VisualElement.Behaviors, VisualElement.Bounds, VisualElement.Height, VisualElement.HeightRequest, VisualElement.InputTransparent, VisualElement.IsEnabled, VisualElement.IsEnabledCore, VisualElement.IsFocused, VisualElement.IsVisible, VisualElement.MinimumHeightRequest, VisualElement.MinimumWidthRequest, VisualElement.MaximumHeightRequest, VisualElement.MaximumWidthRequest, VisualElement.Opacity, VisualElement.Rotation, VisualElement.RotationX, VisualElement.RotationY, VisualElement.Scale, VisualElement.ScaleX, VisualElement.ScaleY, VisualElement.TranslationX, VisualElement.TranslationY, VisualElement.Triggers, VisualElement.Width, VisualElement.WidthRequest, VisualElement.X, VisualElement.Y, VisualElement.Clip, VisualElement.Resources, VisualElement.Frame, VisualElement.Handler, VisualElement.Shadow, VisualElement.ZIndex, VisualElement.DesiredSize, VisualElement.IsLoaded, VisualElement.ChildrenReordered, VisualElement.Focused, VisualElement.MeasureInvalidated, VisualElement.SizeChanged, VisualElement.Unfocused, VisualElement.Loaded, VisualElement.Unloaded, NavigableElement.NavigationProperty, NavigableElement.StyleProperty, NavigableElement.OnParentSet(), NavigableElement.Navigation, NavigableElement.Style, NavigableElement.StyleClass, NavigableElement.class, Element.AutomationIdProperty, Element.ClassIdProperty, Element.ControlsElementMapper, Element.MapAutomationPropertiesIsInAccessibleTree(IElementHandler, Element), Element.MapAutomationPropertiesExcludedWithChildren(IElementHandler, Element), Element.InsertLogicalChild(int, Element), Element.AddLogicalChild(Element), Element.RemoveLogicalChild(Element), Element.ClearLogicalChildren(), Element.FindByName(string), Element.RemoveDynamicResource(BindableProperty), Element.SetDynamicResource(BindableProperty, string), Element.OnBindingContextChanged(), Element.OnChildAdded(Element), Element.OnChildRemoved(Element, int), Element.OnParentSet(), Element.OnPropertyChanged(string), Element.OnParentChanging(ParentChangingEventArgs), Element.OnParentChanged(), Element.OnHandlerChanging(HandlerChangingEventArgs), Element.OnHandlerChanged(), Element.AutomationId, Element.ClassId, Element.Effects, Element.Id, Element.StyleId, Element.Parent, Element.Handler, Element.ChildAdded, Element.ChildRemoved, Element.DescendantAdded, Element.DescendantRemoved, Element.ParentChanging, Element.ParentChanged, Element.HandlerChanging, Element.HandlerChanged, BindableObject.BindingContextProperty, BindableObject.ClearValue(BindableProperty), BindableObject.ClearValue(BindablePropertyKey), BindableObject.GetValue(BindableProperty), BindableObject.IsSet(BindableProperty), BindableObject.RemoveBinding(BindableProperty), BindableObject.SetBinding(BindableProperty, BindingBase), BindableObject.ApplyBindings(), BindableObject.OnBindingContextChanged(), BindableObject.OnPropertyChanged(string), BindableObject.OnPropertyChanging(string), BindableObject.UnapplyBindings(), BindableObject.SetValue(BindableProperty, object), BindableObject.SetValue(BindablePropertyKey, object), BindableObject.CoerceValue(BindableProperty), BindableObject.CoerceValue(BindablePropertyKey), BindableObject.Dispatcher, BindableObject.BindingContext, BindableObject.PropertyChanged, BindableObject.PropertyChanging, BindableObject.BindingContextChanged, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

VelloView()

public VelloView()

Fields

DeviceOptionsProperty

public static readonly BindableProperty DeviceOptionsProperty

Field Value

BindableProperty

IsDiagnosticsEnabledProperty

public static readonly BindableProperty IsDiagnosticsEnabledProperty

Field Value

BindableProperty

PreferredBackendProperty

public static readonly BindableProperty PreferredBackendProperty

Field Value

BindableProperty

RenderLoopDriverProperty

public static readonly BindableProperty RenderLoopDriverProperty

Field Value

BindableProperty

RenderModeProperty

public static readonly BindableProperty RenderModeProperty

Field Value

BindableProperty

SuppressGraphicsViewCompositorProperty

public static readonly BindableProperty SuppressGraphicsViewCompositorProperty

Field Value

BindableProperty

UseTextureViewProperty

public static readonly BindableProperty UseTextureViewProperty

Field Value

BindableProperty

Properties

CompositionInputSource

public ICompositionInputSource? CompositionInputSource { get; }

Property Value

ICompositionInputSource?

DeviceOptions

public VelloGraphicsDeviceOptions DeviceOptions { get; set; }

Property Value

VelloGraphicsDeviceOptions

Diagnostics

public VelloViewDiagnostics Diagnostics { get; }

Property Value

VelloViewDiagnostics

IsDesignMode

public bool IsDesignMode { get; }

Property Value

bool

IsDiagnosticsEnabled

public bool IsDiagnosticsEnabled { get; set; }

Property Value

bool

PreferredBackend

public VelloRenderBackend PreferredBackend { get; set; }

Property Value

VelloRenderBackend

RenderLoopDriver

public RenderLoopDriver RenderLoopDriver { get; set; }

Property Value

RenderLoopDriver

RenderMode

public VelloRenderMode RenderMode { get; set; }

Property Value

VelloRenderMode

SuppressGraphicsViewCompositor

public bool SuppressGraphicsViewCompositor { get; set; }

Property Value

bool

UseTextureView

public bool UseTextureView { get; set; }

Property Value

bool

Methods

InvalidateSurface()

public void InvalidateSurface()

OnDiagnosticsUpdated(VelloDiagnosticsChangedEventArgs)

protected virtual void OnDiagnosticsUpdated(VelloDiagnosticsChangedEventArgs args)

Parameters

args VelloDiagnosticsChangedEventArgs

OnGpuUnavailable(string?)

protected virtual void OnGpuUnavailable(string? reason)

Parameters

reason string?

OnPaintSurface(VelloPaintSurfaceEventArgs)

protected virtual void OnPaintSurface(VelloPaintSurfaceEventArgs args)

Parameters

args VelloPaintSurfaceEventArgs

OnRenderSurface(VelloSurfaceRenderEventArgs)

protected virtual void OnRenderSurface(VelloSurfaceRenderEventArgs args)

Parameters

args VelloSurfaceRenderEventArgs

RequestRender()

public void RequestRender()

DiagnosticsChanged

public event EventHandler<VelloDiagnosticsChangedEventArgs>? DiagnosticsChanged

Event Type

EventHandler<VelloDiagnosticsChangedEventArgs>?

GpuUnavailable

public event EventHandler<string?>? GpuUnavailable

Event Type

EventHandler<string?>?

PaintSurface

public event EventHandler<VelloPaintSurfaceEventArgs>? PaintSurface

Event Type

EventHandler<VelloPaintSurfaceEventArgs>?

RenderSurface

public event EventHandler<VelloSurfaceRenderEventArgs>? RenderSurface

Event Type

EventHandler<VelloSurfaceRenderEventArgs>?