Table of Contents

Class GridSplitterManager<T>

Namespace
SearchAThing.Desktop
Assembly
netcore-desktop.dll

Manage arrangement of control that allow split Vertically or Horizontally.

public class GridSplitterManager<T> : Grid, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, IInputElement, IDataTemplateHost, INamed, ISetterValue, IChildIndexProvider where T : Control, INotifyPropertyChanged

Type Parameters

T
Manage arrangement of control that allow split Vertically or Horizontally.
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
Panel
Grid
GridSplitterManager<T>
Implements
IDataContextProvider
ILogical
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
IStyleable
IInputElement
IDataTemplateHost
INamed
ISetterValue
IChildIndexProvider
Inherited Members
Grid.ShowGridLinesProperty
Grid.ColumnProperty
Grid.RowProperty
Grid.ColumnSpanProperty
Grid.RowSpanProperty
Grid.IsSharedSizeScopeProperty
Grid.GetColumn(Control)
Grid.GetRow(Control)
Grid.GetColumnSpan(Control)
Grid.GetRowSpan(Control)
Grid.GetIsSharedSizeScope(Control)
Grid.MeasureOverride(Size)
Grid.ArrangeOverride(Size)
Grid.ShowGridLines
Grid.ColumnDefinitions
Grid.RowDefinitions
Panel.BackgroundProperty
Panel.Render(DrawingContext)
Panel.AffectsParentArrange<TPanel>(params AvaloniaProperty[])
Panel.AffectsParentMeasure<TPanel>(params AvaloniaProperty[])
Panel.Background
Panel.IsItemsHost
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.ContextRequestedEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.GetTemplateFocusTarget()
Control.OnLoaded(RoutedEventArgs)
Control.OnUnloaded(RoutedEventArgs)
Control.OnSizeChanged(SizeChangedEventArgs)
Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnGotFocus(GotFocusEventArgs)
Control.OnLostFocus(RoutedEventArgs)
Control.OnCreateAutomationPeer()
Control.OnPointerReleased(PointerReleasedEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.ContextRequested
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.LostFocusEvent
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.TappedEvent
InputElement.HoldingEvent
InputElement.DoubleTappedEvent
InputElement.Focus(NavigationMethod, KeyModifiers)
InputElement.OnKeyDown(KeyEventArgs)
InputElement.OnTextInput(TextInputEventArgs)
InputElement.OnPointerEntered(PointerEventArgs)
InputElement.OnPointerExited(PointerEventArgs)
InputElement.OnPointerMoved(PointerEventArgs)
InputElement.OnPointerPressed(PointerPressedEventArgs)
InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
InputElement.UpdateIsEffectivelyEnabled()
InputElement.Focusable
InputElement.IsEnabled
InputElement.Cursor
InputElement.IsKeyboardFocusWithin
InputElement.IsFocused
InputElement.IsHitTestVisible
InputElement.IsPointerOver
InputElement.IsTabStop
InputElement.IsEffectivelyEnabled
InputElement.TabIndex
InputElement.KeyBindings
InputElement.IsEnabledCore
InputElement.GestureRecognizers
InputElement.GotFocus
InputElement.LostFocus
InputElement.KeyDown
InputElement.KeyUp
InputElement.TextInput
InputElement.TextInputMethodClientRequested
InputElement.PointerEntered
InputElement.PointerExited
InputElement.PointerMoved
InputElement.PointerPressed
InputElement.PointerReleased
InputElement.PointerCaptureLost
InputElement.PointerWheelChanged
InputElement.Tapped
InputElement.Holding
InputElement.DoubleTapped
Interactive.RaiseEvent(RoutedEventArgs)
Interactive.BuildEventRoute(RoutedEvent)
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.AffectsMeasure<T>(params AvaloniaProperty[])
Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
Layoutable.MeasureCore(Size)
Layoutable.ArrangeCore(Rect)
Layoutable.OnMeasureInvalidated()
Layoutable.OnVisualParentChanged(Visual, Visual)
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.EffectProperty
Visual.HasMirrorTransformProperty
Visual.RenderTransformProperty
Visual.RenderTransformOriginProperty
Visual.FlowDirectionProperty
Visual.VisualParentProperty
Visual.ZIndexProperty
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.AffectsRender<T>(params AvaloniaProperty[])
Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
Visual.InvalidateMirrorTransform()
Visual.Bounds
Visual.ClipToBounds
Visual.Clip
Visual.IsEffectivelyVisible
Visual.IsVisible
Visual.Opacity
Visual.OpacityMask
Visual.Effect
Visual.HasMirrorTransform
Visual.RenderTransform
Visual.RenderTransformOrigin
Visual.FlowDirection
Visual.ZIndex
Visual.VisualChildren
Visual.VisualRoot
Visual.BypassFlowDirectionPolicies
Visual.AttachedToVisualTree
Visual.DetachedFromVisualTree
StyledElement.DataContextProperty
StyledElement.NameProperty
StyledElement.ParentProperty
StyledElement.TemplatedParentProperty
StyledElement.ThemeProperty
StyledElement.BeginInit()
StyledElement.EndInit()
StyledElement.ApplyStyling()
StyledElement.InitializeIfNeeded()
StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDataContextBeginUpdate()
StyledElement.OnDataContextEndUpdate()
StyledElement.OnInitialized()
StyledElement.Name
StyledElement.Classes
StyledElement.DataContext
StyledElement.IsInitialized
StyledElement.Styles
StyledElement.StyleKey
StyledElement.Resources
StyledElement.TemplatedParent
StyledElement.Theme
StyledElement.LogicalChildren
StyledElement.PseudoClasses
StyledElement.StyleKeyOverride
StyledElement.Parent
StyledElement.ActualThemeVariant
StyledElement.AttachedToLogicalTree
StyledElement.DetachedFromLogicalTree
StyledElement.DataContextChanged
StyledElement.Initialized
StyledElement.ResourcesChanged
StyledElement.ActualThemeVariantChanged
Animatable.TransitionsProperty
Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
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.CoerceValue(AvaloniaProperty)
AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
AvaloniaObject.InheritanceParent
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
Extension Methods

Constructors

GridSplitterManager()

public GridSplitterManager()

Properties

Children

List programmatically created controls

public ObservableCollection<T> Children { get; }

Property Value

ObservableCollection<T>

CreateControl

CreateControl

public Func<T>? CreateControl { get; set; }

Property Value

Func<T>

DebugWriter

set to a valid text writer (eg.Console.Out) to debug structure processing; if null no debug output

public TextWriter? DebugWriter { get; set; }

Property Value

TextWriter

DistributeSplitSize

DistributeSplitSize if false split will half its size; if true (default) it creates a def star so balanced between N axial parallel controls

public bool DistributeSplitSize { get; set; }

Property Value

bool

FocusedControl

FocusedControl

public T? FocusedControl { get; set; }

Property Value

T

FocusedControlBorderBrush

FocusedControlBorderBrush

public IBrush FocusedControlBorderBrush { get; set; }

Property Value

IBrush

FocusedControlBorderThickness

FocusedControlBorderThickness

public double FocusedControlBorderThickness { get; set; }

Property Value

double

JsonSettings

public JsonSerializerSettings JsonSettings { get; }

Property Value

JsonSerializerSettings

SplitterBrush

SplitterBrush

public IBrush SplitterBrush { get; set; }

Property Value

IBrush

SplitterThickness

SplitterThickness

public double SplitterThickness { get; set; }

Property Value

double

Methods

Clear()

remove all layout except the topmost control view

public void Clear()

LoadStructure(GridSplitterManagerLayoutItem, ConfigControlDelegate?)

load split layout from object ( see SaveStructure )

public void LoadStructure(GridSplitterManagerLayoutItem layout, GridSplitterManager<T>.ConfigControlDelegate? reconfigureControl = null)

Parameters

layout GridSplitterManagerLayoutItem

split layout object

reconfigureControl GridSplitterManager<T>.ConfigControlDelegate

optional configure control delegate

See Also

OnPropertyChanged(string?)

invoke this method to forward propertchanged event notification. note: not needed to specify propertyName set by compiler service to called property.

protected void OnPropertyChanged(string? propertyName = null)

Parameters

propertyName string

Remove()

removed currently focused control; does nothing if focused control is null

public void Remove()

SaveStructure(ConfigControlDelegate?)

create a serializable object that hold split configuration

public GridSplitterManagerLayoutItem SaveStructure(GridSplitterManager<T>.ConfigControlDelegate? emitControl = null)

Parameters

emitControl GridSplitterManager<T>.ConfigControlDelegate

optionally an action to save apart control info

Returns

GridSplitterManagerLayoutItem
See Also

ScanGrid(ConfigControlDelegate?, Action<(GridSplitterManagerLayoutItem item, Control control)>?)

public GridSplitterManagerLayoutItem ScanGrid(GridSplitterManager<T>.ConfigControlDelegate? emitControl = null, Action<(GridSplitterManagerLayoutItem item, Control control)>? controlVisited = null)

Parameters

emitControl GridSplitterManager<T>.ConfigControlDelegate
controlVisited Action<(GridSplitterManagerLayoutItem item, Control control)>

Returns

GridSplitterManagerLayoutItem

Split(GridSplitDirection)

split focused control over given direction; does nothing if focused control is null

public T? Split(GridSplitDirection dir)

Parameters

dir GridSplitDirection

split direction

Returns

T

Split(GridSplitDirection, params double[])

split in the direction given producing a set of given sizes children

public T[]? Split(GridSplitDirection dir, params double[] sizes)

Parameters

dir GridSplitDirection

direction split

sizes double[]

list star size for produced children

Returns

T[]

Events

ControlCreated

event fired when a child control created by split

public event GridSplitterManager<T>.ControlEventDelegate ControlCreated

Event Type

GridSplitterManager<T>.ControlEventDelegate

ControlRemoved

event fired when a child control removed by Remove() method

public event GridSplitterManager<T>.ControlEventDelegate ControlRemoved

Event Type

GridSplitterManager<T>.ControlEventDelegate

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler