Class RDFormsDirListBox
A VB DirListBox: a Avalonia.Controls.ListBox that shows a DirListBox component, a folder with the folders above it and the ones it holds.
public sealed class RDFormsDirListBox : ListBox, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider
- Inheritance
-
AvaloniaObjectAnimatableStyledElementVisualLayoutableInteractiveInputElementControlTemplatedControlItemsControlSelectingItemsControlListBoxRDFormsDirListBox
- Implements
-
IDataContextProviderILogicalIThemeVariantHostIResourceHostIResourceNodeIStyleHostISetLogicalParentISetInheritanceParentINamedIInputElementIDataTemplateHostISetterValueIChildIndexProvider
- Inherited Members
-
ListBox.ScrollPropertyListBox.SelectedItemsPropertyListBox.SelectionPropertyListBox.SelectionModePropertyListBox.SelectAll()ListBox.UnselectAll()ListBox.ScrollListBox.SelectedItemsListBox.SelectionListBox.SelectionModeSelectingItemsControl.AutoScrollToSelectedItemPropertySelectingItemsControl.SelectedIndexPropertySelectingItemsControl.SelectedItemPropertySelectingItemsControl.SelectedValuePropertySelectingItemsControl.SelectedValueBindingPropertySelectingItemsControl.IsSelectedPropertySelectingItemsControl.IsTextSearchEnabledPropertySelectingItemsControl.IsSelectedChangedEventSelectingItemsControl.SelectionChangedEventSelectingItemsControl.WrapSelectionPropertySelectingItemsControl.BeginInit()SelectingItemsControl.EndInit()SelectingItemsControl.GetIsSelected(Control)SelectingItemsControl.ItemsControlFromItemContainer(Control)SelectingItemsControl.UpdateSelectionFromEvent(Control, RoutedEventArgs)SelectingItemsControl.AutoScrollToSelectedItemSelectingItemsControl.SelectedIndexSelectingItemsControl.SelectedItemSelectingItemsControl.SelectedValueBindingSelectingItemsControl.SelectedValueSelectingItemsControl.IsTextSearchEnabledSelectingItemsControl.WrapSelectionSelectingItemsControl.SelectionChangedItemsControl.ItemContainerThemePropertyItemsControl.ItemCountPropertyItemsControl.ItemsPanelPropertyItemsControl.ItemsSourcePropertyItemsControl.ItemTemplatePropertyItemsControl.DisplayMemberBindingPropertyItemsControl.IndexFromContainer(Control)ItemsControl.ItemFromContainer(Control)ItemsControl.GetRealizedContainers()ItemsControl.DisplayMemberBindingItemsControl.ItemContainerGeneratorItemsControl.ItemsItemsControl.ItemContainerThemeItemsControl.ItemCountItemsControl.ItemsPanelItemsControl.ItemsSourceItemsControl.ItemTemplateItemsControl.PresenterItemsControl.ItemsPanelRootItemsControl.ItemsViewItemsControl.PreparingContainerItemsControl.ContainerPreparedItemsControl.ContainerIndexChangedItemsControl.ContainerClearingTemplatedControl.BackgroundPropertyTemplatedControl.BackgroundSizingPropertyTemplatedControl.BorderBrushPropertyTemplatedControl.BorderThicknessPropertyTemplatedControl.CornerRadiusPropertyTemplatedControl.FontFamilyPropertyTemplatedControl.FontFeaturesPropertyTemplatedControl.FontSizePropertyTemplatedControl.FontStylePropertyTemplatedControl.FontWeightPropertyTemplatedControl.FontStretchPropertyTemplatedControl.ForegroundPropertyTemplatedControl.LetterSpacingPropertyTemplatedControl.PaddingPropertyTemplatedControl.TemplatePropertyTemplatedControl.IsTemplateFocusTargetPropertyTemplatedControl.TemplateAppliedEventTemplatedControl.GetIsTemplateFocusTarget(Control)TemplatedControl.ApplyTemplate()TemplatedControl.BackgroundTemplatedControl.BackgroundSizingTemplatedControl.BorderBrushTemplatedControl.BorderThicknessTemplatedControl.CornerRadiusTemplatedControl.FontFamilyTemplatedControl.FontFeaturesTemplatedControl.FontSizeTemplatedControl.FontStyleTemplatedControl.FontWeightTemplatedControl.FontStretchTemplatedControl.ForegroundTemplatedControl.LetterSpacingTemplatedControl.PaddingTemplatedControl.TemplateTemplatedControl.TemplateAppliedControl.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.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.Render(DrawingContext)Visual.BoundsVisual.ClipToBoundsVisual.ClipVisual.IsEffectivelyVisibleVisual.IsVisibleVisual.OpacityVisual.OpacityMaskVisual.CacheModeVisual.EffectVisual.HasMirrorTransformVisual.RenderTransformVisual.RenderTransformOriginVisual.FlowDirectionVisual.ZIndexVisual.AttachedToVisualTreeVisual.DetachedFromVisualTreeStyledElement.DataContextPropertyStyledElement.NamePropertyStyledElement.ParentPropertyStyledElement.TemplatedParentPropertyStyledElement.ThemePropertyStyledElement.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
It shows the folders from the root down to Path, then the folders Path holds, as their names are on disk, sorted without regard to case; a hidden folder is left out. Each is indented one step further than the folder above it, and its subfolders one step further than Path. The folders it holds are items 0 to ListCount - 1; Path itself is item -1, and the folders above it are items -2, -3 and so on up to the root.
It raises Change, Click, GotFocus, LostFocus, KeyDown, KeyPress, KeyUp, MouseDown, MouseMove and MouseUp, and no DblClick. A press, a key or a typed character raises Click as a ListBox's does, and a double click on a folder makes it the Path, with no Click for its second release.
Constructors
RDFormsDirListBox(ComponentInstance, IFileSystem)
Creates a list that shows a DirListBox.
public RDFormsDirListBox(ComponentInstance instance, IFileSystem fileSystem)
Parameters
instanceComponentInstanceThe DirListBox.
fileSystemIFileSystemThe file system it lists the folders of. Its current directory is the list's first Path.
Exceptions
- ArgumentNullException
instanceorfileSystemis null.- ArgumentException
instanceis not a DirListBox.
Properties
ListCount
The number of folders Path holds.
public int ListCount { get; }
Property Value
ListIndex
The selected folder: 0 to ListCount - 1 for a folder Path holds, -1 for Path, and -2 and below for the folders above it.
public int ListIndex { get; set; }
Property Value
Remarks
Setting it raises Click when it moves the selection, and none when it is set again. It leaves Path as it is.
Exceptions
- FormErrorException
Set to no folder of the list: 381, Invalid property array index.
Path
The folder shown, without a separator at its end, in the case it was given.
public string Path { get; set; }
Property Value
Remarks
A relative path is taken from the list's own Path. Setting a new folder lists it, makes ListIndex -1, and raises Change; setting the same one again raises nothing.
Exceptions
- FormErrorException
Set to a folder that does not exist: 76, Path not found.
StyleKeyOverride
Gets the type by which the element is styled.
protected override Type StyleKeyOverride { get; }
Property Value
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
CreateContainerForItemOverride(object?, int, object?)
Creates or a container that can be used to display an item.
protected override Control CreateContainerForItemOverride(object? item, int index, object? recycleKey)
Parameters
Returns
- Control
GetList(int)
Gets a folder's full path.
public string GetList(int index)
Parameters
indexintThe folder's index: 0 to ListCount - 1 for a folder Path holds, -1 for Path, and -2 and below for the folders above it.
Returns
- string
The folder's full path, or "" for an index of no folder.
OnKeyDown(KeyEventArgs)
Handles directional navigation within the Avalonia.Controls.ItemsControl.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
eKeyEventArgsThe key events.
OnTextInput(TextInputEventArgs)
Invoked when an unhandled Avalonia.Input.InputElement.TextInputEvent reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnTextInput(TextInputEventArgs e)
Parameters
eTextInputEventArgsData about the event.
PrepareContainerForItemOverride(Control, object?, int)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(Control container, object? item, int index)
Parameters
containerControlThe element that's used to display the specified item.
itemobjectThe item to display.
indexintThe index of the item to display.
Refresh()
public void Refresh()