Class RDFormsFormView
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
-
AvaloniaObjectAnimatableStyledElementVisualLayoutableInteractiveInputElementControlPanelCanvasRDFormsFormView
- Implements
-
IDataContextProviderILogicalIThemeVariantHostIResourceHostIResourceNodeIStyleHostISetLogicalParentISetInheritanceParentINamedIInputElementIDataTemplateHostISetterValueIChildIndexProviderINavigableContainer
- Inherited Members
-
Canvas.LeftPropertyCanvas.TopPropertyCanvas.RightPropertyCanvas.BottomPropertyCanvas.GetLeft(AvaloniaObject)Canvas.GetTop(AvaloniaObject)Canvas.GetRight(AvaloniaObject)Canvas.GetBottom(AvaloniaObject)Panel.BackgroundPropertyPanel.Render(DrawingContext)Panel.ChildrenPanel.BackgroundPanel.IsItemsHostControl.FocusAdornerPropertyControl.TagPropertyControl.ContextMenuPropertyControl.ContextFlyoutPropertyControl.RequestBringIntoViewEventControl.LoadedEventControl.UnloadedEventControl.SizeChangedEventControl.FocusAdornerControl.DataTemplatesControl.ContextMenuControl.ContextFlyoutControl.IsLoadedControl.TagControl.LoadedControl.UnloadedControl.SizeChangedInputElement.FocusablePropertyInputElement.IsEnabledPropertyInputElement.IsEffectivelyEnabledPropertyInputElement.CursorPropertyInputElement.IsKeyboardFocusWithinPropertyInputElement.IsFocusedPropertyInputElement.IsHitTestVisiblePropertyInputElement.IsPointerOverPropertyInputElement.IsTabStopPropertyInputElement.GotFocusEventInputElement.GettingFocusEventInputElement.LostFocusEventInputElement.LosingFocusEventInputElement.KeyDownEventInputElement.KeyUpEventInputElement.TabIndexPropertyInputElement.TextInputEventInputElement.TextInputMethodClientRequestedEventInputElement.PointerEnteredEventInputElement.PointerExitedEventInputElement.PointerMovedEventInputElement.PointerPressedEventInputElement.PointerReleasedEventInputElement.PointerCaptureLostEventInputElement.PointerWheelChangedEventInputElement.ContextRequestedEventInputElement.ContextCanceledEventInputElement.IsHoldingEnabledPropertyInputElement.IsHoldWithMouseEnabledPropertyInputElement.PinchEventInputElement.PinchEndedEventInputElement.PullGestureEventInputElement.PullGestureEndedEventInputElement.SwipeGestureEventInputElement.SwipeGestureEndedEventInputElement.ScrollGestureEventInputElement.ScrollGestureInertiaStartingEventInputElement.ScrollGestureEndedEventInputElement.PointerTouchPadGestureMagnifyEventInputElement.PointerTouchPadGestureRotateEventInputElement.PointerTouchPadGestureSwipeEventInputElement.TappedEventInputElement.RightTappedEventInputElement.HoldingEventInputElement.DoubleTappedEventInputElement.Focus(NavigationMethod, KeyModifiers)InputElement.GetIsHoldingEnabled(StyledElement)InputElement.GetIsHoldWithMouseEnabled(StyledElement)InputElement.FocusableInputElement.IsEnabledInputElement.CursorInputElement.IsKeyboardFocusWithinInputElement.IsFocusedInputElement.IsHitTestVisibleInputElement.IsPointerOverInputElement.IsTabStopInputElement.IsEffectivelyEnabledInputElement.TabIndexInputElement.KeyBindingsInputElement.GestureRecognizersInputElement.GotFocusInputElement.GettingFocusInputElement.LostFocusInputElement.LosingFocusInputElement.KeyDownInputElement.KeyUpInputElement.TextInputInputElement.TextInputMethodClientRequestedInputElement.PointerEnteredInputElement.PointerExitedInputElement.PointerMovedInputElement.PointerPressedInputElement.PointerReleasedInputElement.PointerCaptureLostInputElement.PointerWheelChangedInputElement.ContextRequestedInputElement.ContextCanceledInputElement.PinchInputElement.PinchEndedInputElement.PullGestureInputElement.PullGestureEndedInputElement.ScrollGestureInputElement.ScrollGestureInertiaStartingInputElement.ScrollGestureEndedInputElement.PointerTouchPadGestureMagnifyInputElement.PointerTouchPadGestureRotateInputElement.SwipeGestureInputElement.SwipeGestureEndedInputElement.PointerTouchPadGestureSwipeInputElement.TappedInputElement.RightTappedInputElement.HoldingInputElement.DoubleTappedInteractive.RaiseEvent(RoutedEventArgs)Layoutable.DesiredSizePropertyLayoutable.WidthPropertyLayoutable.HeightPropertyLayoutable.MinWidthPropertyLayoutable.MaxWidthPropertyLayoutable.MinHeightPropertyLayoutable.MaxHeightPropertyLayoutable.MarginPropertyLayoutable.HorizontalAlignmentPropertyLayoutable.VerticalAlignmentPropertyLayoutable.UseLayoutRoundingPropertyLayoutable.UpdateLayout()Layoutable.ApplyTemplate()Layoutable.Measure(Size)Layoutable.Arrange(Rect)Layoutable.InvalidateMeasure()Layoutable.InvalidateArrange()Layoutable.WidthLayoutable.HeightLayoutable.MinWidthLayoutable.MaxWidthLayoutable.MinHeightLayoutable.MaxHeightLayoutable.MarginLayoutable.HorizontalAlignmentLayoutable.VerticalAlignmentLayoutable.DesiredSizeLayoutable.IsMeasureValidLayoutable.IsArrangeValidLayoutable.UseLayoutRoundingLayoutable.EffectiveViewportChangedLayoutable.LayoutUpdatedVisual.BoundsPropertyVisual.ClipToBoundsPropertyVisual.ClipPropertyVisual.IsVisiblePropertyVisual.OpacityPropertyVisual.OpacityMaskPropertyVisual.CacheModePropertyVisual.EffectPropertyVisual.HasMirrorTransformPropertyVisual.RenderTransformPropertyVisual.RenderTransformOriginPropertyVisual.FlowDirectionPropertyVisual.VisualParentPropertyVisual.ZIndexPropertyVisual.GetFlowDirection(Visual)Visual.SetFlowDirection(Visual, FlowDirection)Visual.InvalidateVisual()Visual.BoundsVisual.ClipToBoundsVisual.ClipVisual.IsEffectivelyVisibleVisual.IsVisibleVisual.OpacityVisual.OpacityMaskVisual.CacheModeVisual.EffectVisual.HasMirrorTransformVisual.RenderTransformVisual.RenderTransformOriginVisual.FlowDirectionVisual.ZIndexVisual.AttachedToVisualTreeVisual.DetachedFromVisualTreeStyledElement.DataContextPropertyStyledElement.NamePropertyStyledElement.ParentPropertyStyledElement.TemplatedParentPropertyStyledElement.ThemePropertyStyledElement.BeginInit()StyledElement.EndInit()StyledElement.ApplyStyling()StyledElement.NameStyledElement.ClassesStyledElement.DataContextStyledElement.IsInitializedStyledElement.StylesStyledElement.StyleKeyStyledElement.ResourcesStyledElement.TemplatedParentStyledElement.ThemeStyledElement.ParentStyledElement.ActualThemeVariantStyledElement.AttachedToLogicalTreeStyledElement.DetachedFromLogicalTreeStyledElement.DataContextChangedStyledElement.InitializedStyledElement.ResourcesChangedStyledElement.ActualThemeVariantChangedAnimatable.TransitionsPropertyAnimatable.TransitionsAvaloniaObject.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.DispatcherAvaloniaObject.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
formFormDefinitionThe form.
Remarks
Its file lists show the machine's file system, from the process's current directory.
Exceptions
- ArgumentNullException
formis 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
formFormDefinitionThe form.
fileSystemIFileSystemThe file system the form's file lists show, from its current directory.
Exceptions
- ArgumentNullException
formorfileSystemis null.
Properties
Drawing
The surface the form's drawing statements draw on, under its controls.
public RDFormsDrawingLayer Drawing { get; }
Property Value
Form
The form the view shows.
public FormDefinition Form { get; }
Property Value
KeepSystemTheme
Whether the view keeps the theme variant of what it is in.
public bool KeepSystemTheme { get; set; }
Property Value
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
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
finalSizeSizeThe 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
componentComponentInstanceThe component.
Returns
- Control
The control, or null where the component is not shown.