GetParentGrid Method
Retrieves the Grid that ultimately hosts this GridSplitter in the visual/logical tree.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
protected virtual Grid? GetParentGrid()
Protected Overridable Function GetParentGrid As Grid
abstract GetParentGrid : unit -> Grid
override GetParentGrid : unit -> Grid
Return Value
Grid
The containing Grid if one is found; otherwise null
.
Remarks
A splitter can be placed directly inside a Grid or indirectly inside an ItemsControl that uses a Grid as its ItemsPanel. In the latter case the first logical parent is usually an ContentPresenter (or the items control itself), so the method walks these intermediate containers to locate the underlying grid.