Table of Contents

Class RDFormsFormView

Namespace
RDCore.Forms.Avalonia.Rendering
Assembly
RDCore.Forms.Avalonia.dll

A form's client area: a canvas that shows the controls of a FormDefinition, placed, stacked and ordered as VB places, stacks and orders them.

public sealed class RDFormsFormView : Canvas, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider, INavigableContainer
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
Panel
Canvas
RDFormsFormView
Implements
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
INamed
IInputElement
IDataTemplateHost
ISetterValue
IChildIndexProvider
INavigableContainer
Inherited Members
Canvas.LeftProperty
Canvas.TopProperty
Canvas.RightProperty
Canvas.BottomProperty
Canvas.GetLeft(AvaloniaObject)
Canvas.GetTop(AvaloniaObject)
Canvas.GetRight(AvaloniaObject)
Canvas.GetBottom(AvaloniaObject)
Panel.BackgroundProperty
Panel.Render(DrawingContext)
Panel.Children
Panel.Background
Panel.IsItemsHost
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

Remarks

Every component of the form that Create(ComponentInstance, IFileSystem) makes a control for is shown, in its container's canvas. A component it makes no control for, such as a menu item, is not shown here, and neither is anything placed in one: a form's window shows its menus on its MenuBar. A Timer's control is on the form and draws nothing.

A control's Left, Top, Width and Height are pixels whatever its container's ScaleMode, and place it as they are. In each container the first control the form holds is on top until a ZOrder call moves one, and a windowless control (a Label or an Image) is under every windowed one, whatever their order.

Tab and Shift+Tab move the focus through one order across the whole form, a control in a Frame or a PictureBox included: by TabIndex, the order the form holds them in deciding a tie. A TabIndex past the last place takes the first place no other control has, in the order the form holds them. The focus skips a control that cannot take it: one whose TabStop is False, a Label or a Frame, and one that is hidden or disabled, or in a hidden or disabled container.

The view follows the root's Width, Height, BackColor, Enabled, Font and MousePointer. A disabled root takes no input in any of its controls.

A control the form's AddControl(ComponentClass, string, ComponentInstance?) adds is shown at once, under the controls of its plane already in its container, and last in the form's order. One that RemoveControl(ComponentInstance) removes goes at once, with what it holds; where the focus was in it, the focus goes to the first control of the tab order that can take it.

The root's drawing statements draw on its Drawing, under every control. The root's Picture is under its drawing, at its size in pixels from the top left corner, and a picture that is refused is not drawn (see PictureError).

A press on no control is the root's: it raises MouseDown, MouseMove and MouseUp with X and Y in the root's scale, and Click after MouseUp, for every button, where the release is over the root again and over none of its controls. A double click's second press raises DblClick in place of its MouseDown, and its release raises MouseUp and no Click.

Constructors

RDFormsFormView(FormDefinition)

Creates the client area of a form.

public RDFormsFormView(FormDefinition form)

Parameters

form FormDefinition

The form.

Remarks

Its file lists show the machine's file system, from the process's current directory.

Exceptions

ArgumentNullException

form is null.

RDFormsFormView(FormDefinition, IFileSystem)

Creates the client area of a form, with the file system its file lists show.

public RDFormsFormView(FormDefinition form, IFileSystem fileSystem)

Parameters

form FormDefinition

The form.

fileSystem IFileSystem

The file system the form's file lists show, from its current directory.

Exceptions

ArgumentNullException

form or fileSystem is null.

Properties

Drawing

The surface the form's drawing statements draw on, under its controls.

public RDFormsDrawingLayer Drawing { get; }

Property Value

RDFormsDrawingLayer

Form

The form the view shows.

public FormDefinition Form { get; }

Property Value

FormDefinition

KeepSystemTheme

Whether the view keeps the theme variant of what it is in.

public bool KeepSystemTheme { get; set; }

Property Value

bool

Remarks

false, the default, shows the form in the light theme variant, whatever the variant around it. true shows it in the variant of what it is in: its window's, or the application's where nothing between them sets one. The form's system colours are drawn in the view's variant, with FormPalette's palette for it, and drawn again as it changes. A form's window sets it from its own KeepSystemTheme, and a UserControl's view is true, in its container's variant.

PictureError

The error the root's Picture was refused with, InvalidPicture, or null where it is drawn or there is none.

public FormError? PictureError { get; }

Property Value

FormError?

TabOrder

The controls that take part in the form's tab order, in it: every shown control whose class has a TabIndex, whether or not it can take the focus now.

public IReadOnlyList<Control> TabOrder { get; }

Property Value

IReadOnlyList<Control>

Methods

ArrangeOverride(Size)

Arranges the control's children.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

The size allocated to the control.

Returns

Size

The space taken.

ControlOf(ComponentInstance)

Gets the control that shows a component of the form.

public Control? ControlOf(ComponentInstance component)

Parameters

component ComponentInstance

The component.

Returns

Control

The control, or null where the component is not shown.