Table of Contents

Class RDFormsDriveListBox

Namespace
RDCore.Forms.Avalonia.Controls
Assembly
RDCore.Forms.Avalonia.dll

A VB DriveListBox: a Avalonia.Controls.ComboBox that shows a DriveListBox component, the drives of a file system.

public sealed class RDFormsDriveListBox : ComboBox, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
TemplatedControl
ItemsControl
SelectingItemsControl
ComboBox
RDFormsDriveListBox
Implements
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
INamed
IInputElement
IDataTemplateHost
ISetterValue
IChildIndexProvider
Inherited Members
ComboBox.IsDropDownOpenProperty
ComboBox.IsEditableProperty
ComboBox.MaxDropDownHeightProperty
ComboBox.SelectionBoxItemProperty
ComboBox.PlaceholderTextProperty
ComboBox.PlaceholderForegroundProperty
ComboBox.HorizontalContentAlignmentProperty
ComboBox.VerticalContentAlignmentProperty
ComboBox.TextProperty
ComboBox.SelectionBoxItemTemplateProperty
ComboBox.UpdateSelectionFromEvent(Control, RoutedEventArgs)
ComboBox.Clear()
ComboBox.IsDropDownOpen
ComboBox.IsEditable
ComboBox.MaxDropDownHeight
ComboBox.SelectionBoxItem
ComboBox.PlaceholderText
ComboBox.PlaceholderForeground
ComboBox.HorizontalContentAlignment
ComboBox.VerticalContentAlignment
ComboBox.SelectionBoxItemTemplate
ComboBox.Text
ComboBox.DropDownClosed
ComboBox.DropDownOpened
SelectingItemsControl.AutoScrollToSelectedItemProperty
SelectingItemsControl.SelectedIndexProperty
SelectingItemsControl.SelectedItemProperty
SelectingItemsControl.SelectedValueProperty
SelectingItemsControl.SelectedValueBindingProperty
SelectingItemsControl.IsSelectedProperty
SelectingItemsControl.IsTextSearchEnabledProperty
SelectingItemsControl.IsSelectedChangedEvent
SelectingItemsControl.SelectionChangedEvent
SelectingItemsControl.WrapSelectionProperty
SelectingItemsControl.BeginInit()
SelectingItemsControl.EndInit()
SelectingItemsControl.GetIsSelected(Control)
SelectingItemsControl.ItemsControlFromItemContainer(Control)
SelectingItemsControl.AutoScrollToSelectedItem
SelectingItemsControl.SelectedIndex
SelectingItemsControl.SelectedItem
SelectingItemsControl.SelectedValueBinding
SelectingItemsControl.SelectedValue
SelectingItemsControl.IsTextSearchEnabled
SelectingItemsControl.WrapSelection
SelectingItemsControl.SelectionChanged
ItemsControl.ItemContainerThemeProperty
ItemsControl.ItemCountProperty
ItemsControl.ItemsPanelProperty
ItemsControl.ItemsSourceProperty
ItemsControl.ItemTemplateProperty
ItemsControl.DisplayMemberBindingProperty
ItemsControl.IndexFromContainer(Control)
ItemsControl.ItemFromContainer(Control)
ItemsControl.GetRealizedContainers()
ItemsControl.DisplayMemberBinding
ItemsControl.ItemContainerGenerator
ItemsControl.Items
ItemsControl.ItemContainerTheme
ItemsControl.ItemCount
ItemsControl.ItemsPanel
ItemsControl.ItemsSource
ItemsControl.ItemTemplate
ItemsControl.Presenter
ItemsControl.ItemsPanelRoot
ItemsControl.ItemsView
ItemsControl.PreparingContainer
ItemsControl.ContainerPrepared
ItemsControl.ContainerIndexChanged
ItemsControl.ContainerClearing
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.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.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.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.Render(DrawingContext)
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.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

A drive with a letter shows as the letter in lower case and a colon, then its volume label in brackets where it has one, such as c: [Windows]. A drive without a letter, as on Linux and macOS, shows as its root's path, such as /.

It raises Change, GotFocus, LostFocus, KeyDown, KeyPress and KeyUp, and no Click and no mouse events. Change comes whenever another drive, or none, is chosen, by the user or by code.

Constructors

RDFormsDriveListBox(ComponentInstance, IFileSystem)

Creates a list that shows a DriveListBox.

public RDFormsDriveListBox(ComponentInstance instance, IFileSystem fileSystem)

Parameters

instance ComponentInstance

The DriveListBox.

fileSystem IFileSystem

The file system it lists the drives of. The drive of its current directory is the first one chosen.

Exceptions

ArgumentNullException

instance or fileSystem is null.

ArgumentException

instance is not a DriveListBox.

Properties

Drive

The chosen drive, as it shows, such as c: [Windows], or "" where none is chosen.

public string Drive { get; set; }

Property Value

string

Remarks

It is set to a drive's letter, alone or followed by a colon and anything, such as c, c:, c: [Windows] or C:\Windows, or, for a drive without a letter, to a path on it. Setting another drive raises Change; setting the chosen one again raises nothing.

Exceptions

FormErrorException

Set to "": 380, Invalid property value. Set to no drive of the list: 68, Device unavailable.

ListCount

The number of drives.

public int ListCount { get; }

Property Value

int

ListIndex

The chosen drive's index, from 0, or -1 where none is chosen.

public int ListIndex { get; set; }

Property Value

int

Remarks

Setting it chooses that drive, or none for -1, and raises Change where that is another.

Exceptions

FormErrorException

Set outside -1 to ListCount - 1: 381, Invalid property array index.

StyleKeyOverride

Gets the type by which the element is styled.

protected override Type StyleKeyOverride { get; }

Property Value

Type

Remarks

Usually controls are styled by their own type, but there are instances where you want an element to be styled by its base type, e.g. creating SpecialButton that derives from Button and adds extra functionality but is still styled as a regular Button. Override this property to change the style for a control class, returning the type that you wish the elements to be styled as.

Methods

GetList(int)

Gets a drive as it shows.

public string GetList(int index)

Parameters

index int

The drive's index, from 0.

Returns

string

The drive, or "" for an index outside the list.

OnApplyTemplate(TemplateAppliedEventArgs)

Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.

protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

Parameters

e TemplateAppliedEventArgs

The event args.

OnCreateAutomationPeer()

Returns a new, type-specific Avalonia.Automation.Peers.AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific Avalonia.Automation.Peers.AutomationPeer implementation.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

PrepareContainerForItemOverride(Control, object?, int)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(Control container, object? item, int index)

Parameters

container Control

The element that's used to display the specified item.

item object

The item to display.

index int

The index of the item to display.

Refresh()

Reads the drives again, and keeps the chosen one where it is still there; otherwise chooses the first, and raises Change.

public void Refresh()