maze-project
Show / Hide Table of Contents

Class MazeGrid

The MazeGrid class represents an interactive maze grid

Inheritance
object
BindableObject
Element
NavigableElement
VisualElement
View
Layout
Grid
Grid
MazeGrid
Implements
INotifyPropertyChanged
IEffectControlProvider
IToolTipElement
IContextFlyoutElement
IAnimatable
IViewController
IVisualElementController
IElementController
IGestureController
IGestureRecognizers
IPropertyMapperView
IHotReloadableView
IReplaceableView
IBindableLayout
IVisualTreeElement
IGridLayout
ILayout
IView
IElement
ITransform
IContainer
IList<IView>
ICollection<IView>
IEnumerable<IView>
IEnumerable
ISafeAreaView
IPadding
ICrossPlatformLayout
Inherited Members
Grid.ContainerScrollViewProperty
Grid.ContainerContentViewProperty
Grid.InitializeContent()
Grid.GetHeaderCellContent(HeaderType, int)
Grid.SetCellContent(int, int, ContentView)
Grid.SetCellContent(CellFrame, ContentView)
Grid.ActivateCell(CellPoint, bool)
Grid.ActivateCell(int, int, bool)
Grid.EnableExtendedSelection()
Grid.CancelExtendedSelection()
Grid.ResetSelection(CellRange)
Grid.GetSelectionState()
Grid.RestoreSelectionState(SelectionState, bool, bool)
Grid.GetCellsWidth(CellRange)
Grid.GetColumnWidth(int)
Grid.GetCellsHeight(CellRange)
Grid.GetRowHeight(int)
Grid.FindCellRowAtYOffset(int, Grid.YOffsetType, double)
Grid.FindCellColumnAtXOffset(int, Grid.XOffsetType, double)
Grid.GetCell(int, int)
Grid.DeleteSelectedRows()
Grid.InsertSelectedRows()
Grid.DeleteSelectedColumns()
Grid.InsertSelectedColumns()
Grid.DeleteRows(int, int)
Grid.InsertRows(int, int)
Grid.DeleteColumns(int, int)
Grid.InsertColumns(int, int)
Grid.IsValidDisplayRow(int)
Grid.IsValidDisplayColumn(int)
Grid.GetAsyncKeyState(int)
Grid.RowCount
Grid.ColumnCount
Grid.ColumnHeaderHeight
Grid.ColumnHeaderMargin
Grid.ColumnHeaderPadding
Grid.RowHeaderWidth
Grid.RowHeaderMargin
Grid.RowHeaderPadding
Grid.CellHeight
Grid.CellWidth
Grid.CellMargin
Grid.CellPadding
Grid.HeaderBorderColor
Grid.HeaderBackgroundColor
Grid.HeaderSelectedBackgroundColor
Grid.HeaderActiveBackgroundColor
Grid.HeaderTextColor
Grid.CellBorderColor
Grid.CellBackgroundColor
Grid.HighlightCellBackgroundColor
Grid.ActiveCellBackgroundColor
Grid.AnchorCellBackgroundColor
Grid.SelectionFrameBorderColor
Grid.SelectionFrameBorderWidth
Grid.SelectionFrameBorderGripDiameter
Grid.IsExtendedSelectionMode
Grid.IsPanSupportEnabled
Grid.AllColumnsSelected
Grid.AllRowsSelected
Grid.ActiveCell
Grid.CurrentSelection
Grid.ContainerScrollView
Grid.ContainerContentView
Grid.ColumnDefinitionsProperty
Grid.RowDefinitionsProperty
Grid.RowSpacingProperty
Grid.ColumnSpacingProperty
Grid.RowProperty
Grid.RowSpanProperty
Grid.ColumnProperty
Grid.ColumnSpanProperty
Grid.GetColumn(BindableObject)
Grid.GetColumnSpan(BindableObject)
Grid.GetRow(BindableObject)
Grid.GetRowSpan(BindableObject)
Grid.SetColumn(BindableObject, int)
Grid.SetColumnSpan(BindableObject, int)
Grid.SetRow(BindableObject, int)
Grid.SetRowSpan(BindableObject, int)
Grid.GetColumn(IView)
Grid.GetColumnSpan(IView)
Grid.GetRow(IView)
Grid.GetRowSpan(IView)
Grid.AddRowDefinition(RowDefinition)
Grid.AddColumnDefinition(ColumnDefinition)
Grid.SetRow(IView, int)
Grid.SetRowSpan(IView, int)
Grid.SetColumn(IView, int)
Grid.SetColumnSpan(IView, int)
Grid.OnAdd(int, IView)
Grid.OnClear()
Grid.OnRemove(int, IView)
Grid.OnInsert(int, IView)
Grid.OnUpdate(int, IView, IView)
Grid.CreateLayoutManager()
Grid.InvalidateMeasure()
Grid.OnBindingContextChanged()
Grid.ColumnDefinitions
Grid.RowDefinitions
Grid.RowSpacing
Grid.ColumnSpacing
Layout._layoutManager
Layout.IsClippedToBoundsProperty
Layout.PaddingProperty
Layout.CascadeInputTransparentProperty
Layout.ControlsLayoutMapper
Layout.GetEnumerator()
Layout.Measure(double, double, MeasureFlags)
Layout.InvalidateMeasureOverride()
Layout.Add(IView)
Layout.Clear()
Layout.Contains(IView)
Layout.CopyTo(IView[], int)
Layout.IndexOf(IView)
Layout.Insert(int, IView)
Layout.Remove(IView)
Layout.RemoveAt(int)
Layout.CrossPlatformMeasure(double, double)
Layout.CrossPlatformArrange(Rect)
Layout.MapInputTransparent(LayoutHandler, Layout)
Layout.MapInputTransparent(ILayoutHandler, Layout)
Layout.Children
Layout.Count
Layout.IsReadOnly
Layout.this[int]
Layout.IsClippedToBounds
Layout.Padding
Layout.IgnoreSafeArea
Layout.CascadeInputTransparent
View.VerticalOptionsProperty
View.HorizontalOptionsProperty
View.MarginProperty
View.propertyMapper
View.ChangeVisualState()
View.GetChildElements(Point)
View.GetRendererOverrides<T>()
View.GestureController
View.GestureRecognizers
View.HorizontalOptions
View.Margin
View.VerticalOptions
VisualElement.NavigationProperty
VisualElement.StyleProperty
VisualElement.InputTransparentProperty
VisualElement.IsEnabledProperty
VisualElement.XProperty
VisualElement.YProperty
VisualElement.AnchorXProperty
VisualElement.AnchorYProperty
VisualElement.TranslationXProperty
VisualElement.TranslationYProperty
VisualElement.WidthProperty
VisualElement.HeightProperty
VisualElement.RotationProperty
VisualElement.RotationXProperty
VisualElement.RotationYProperty
VisualElement.ScaleProperty
VisualElement.ScaleXProperty
VisualElement.ScaleYProperty
VisualElement.ClipProperty
VisualElement.VisualProperty
VisualElement.IsVisibleProperty
VisualElement.OpacityProperty
VisualElement.BackgroundColorProperty
VisualElement.BackgroundProperty
VisualElement.BehaviorsProperty
VisualElement.TriggersProperty
VisualElement.WidthRequestProperty
VisualElement.HeightRequestProperty
VisualElement.MinimumWidthRequestProperty
VisualElement.MinimumHeightRequestProperty
VisualElement.MaximumWidthRequestProperty
VisualElement.MaximumHeightRequestProperty
VisualElement.IsFocusedProperty
VisualElement.FlowDirectionProperty
VisualElement.WindowProperty
VisualElement.ShadowProperty
VisualElement.ZIndexProperty
VisualElement.ControlsVisualElementMapper
VisualElement.BatchBegin()
VisualElement.BatchCommit()
VisualElement.Focus()
VisualElement.Unfocus()
VisualElement.OnChildAdded(Element)
VisualElement.OnChildRemoved(Element, int)
VisualElement.OnChildrenReordered()
VisualElement.OnMeasure(double, double)
VisualElement.OnSizeAllocated(double, double)
VisualElement.SizeAllocated(double, double)
VisualElement.RefreshIsEnabledProperty()
VisualElement.Arrange(Rect)
VisualElement.ArrangeOverride(Rect)
VisualElement.Layout(Rect)
VisualElement.MeasureOverride(double, double)
VisualElement.MapBackgroundColor(IViewHandler, IView)
VisualElement.MapBackgroundImageSource(IViewHandler, IView)
VisualElement.MapAccessKeyHorizontalOffset(IViewHandler, IView)
VisualElement.MapAccessKeyPlacement(IViewHandler, IView)
VisualElement.MapAccessKey(IViewHandler, IView)
VisualElement.MapAccessKeyVerticalOffset(IViewHandler, IView)
VisualElement.Visual
VisualElement.FlowDirection
VisualElement.Window
VisualElement.AnchorX
VisualElement.AnchorY
VisualElement.BackgroundColor
VisualElement.Background
VisualElement.Behaviors
VisualElement.Bounds
VisualElement.Height
VisualElement.HeightRequest
VisualElement.InputTransparent
VisualElement.IsEnabled
VisualElement.IsEnabledCore
VisualElement.IsFocused
VisualElement.IsVisible
VisualElement.MinimumHeightRequest
VisualElement.MinimumWidthRequest
VisualElement.MaximumHeightRequest
VisualElement.MaximumWidthRequest
VisualElement.Opacity
VisualElement.Rotation
VisualElement.RotationX
VisualElement.RotationY
VisualElement.Scale
VisualElement.ScaleX
VisualElement.ScaleY
VisualElement.TranslationX
VisualElement.TranslationY
VisualElement.Triggers
VisualElement.Width
VisualElement.WidthRequest
VisualElement.X
VisualElement.Y
VisualElement.Clip
VisualElement.Resources
VisualElement.Frame
VisualElement.Handler
VisualElement.Shadow
VisualElement.ZIndex
VisualElement.DesiredSize
VisualElement.IsLoaded
VisualElement.ChildrenReordered
VisualElement.Focused
VisualElement.MeasureInvalidated
VisualElement.SizeChanged
VisualElement.Unfocused
VisualElement.Loaded
VisualElement.Unloaded
NavigableElement.OnParentSet()
NavigableElement.Navigation
NavigableElement.Style
NavigableElement.StyleClass
NavigableElement.class
Element.AutomationIdProperty
Element.ClassIdProperty
Element.ControlsElementMapper
Element.InsertLogicalChild(int, Element)
Element.AddLogicalChild(Element)
Element.RemoveLogicalChild(Element)
Element.ClearLogicalChildren()
Element.FindByName(string)
Element.RemoveDynamicResource(BindableProperty)
Element.SetDynamicResource(BindableProperty, string)
Element.OnPropertyChanged(string)
Element.OnParentChanging(ParentChangingEventArgs)
Element.OnParentChanged()
Element.OnHandlerChanging(HandlerChangingEventArgs)
Element.OnHandlerChanged()
Element.MapAutomationPropertiesIsInAccessibleTree(IElementHandler, Element)
Element.MapAutomationPropertiesLabeledBy(IElementHandler, Element)
Element.MapAutomationPropertiesHelpText(IElementHandler, Element)
Element.MapAutomationPropertiesName(IElementHandler, Element)
Element.MapAutomationPropertiesExcludedWithChildren(IElementHandler, Element)
Element.AutomationId
Element.ClassId
Element.Effects
Element.Id
Element.StyleId
Element.Parent
Element.ChildAdded
Element.ChildRemoved
Element.DescendantAdded
Element.DescendantRemoved
Element.ParentChanging
Element.ParentChanged
Element.HandlerChanging
Element.HandlerChanged
BindableObject.BindingContextProperty
BindableObject.ClearValue(BindableProperty)
BindableObject.ClearValue(BindablePropertyKey)
BindableObject.GetValue(BindableProperty)
BindableObject.IsSet(BindableProperty)
BindableObject.RemoveBinding(BindableProperty)
BindableObject.SetBinding(BindableProperty, BindingBase)
BindableObject.ApplyBindings()
BindableObject.OnPropertyChanging(string)
BindableObject.UnapplyBindings()
BindableObject.SetValue(BindableProperty, object)
BindableObject.SetValue(BindablePropertyKey, object)
BindableObject.CoerceValue(BindableProperty)
BindableObject.CoerceValue(BindablePropertyKey)
BindableObject.Dispatcher
BindableObject.BindingContext
BindableObject.PropertyChanged
BindableObject.PropertyChanging
BindableObject.BindingContextChanged
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Maze.Maui.App
Assembly: Maze.Maui.App.dll
Syntax
public class MazeGrid : Grid, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IBindableLayout, IVisualTreeElement, IGridLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout

Constructors

MazeGrid()

Constructor

Declaration
public MazeGrid()

Properties

FinishCell

Finish cell (if any)

Declaration
public CellFrame? FinishCell { get; }
Property Value
Type Description
CellFrame

Finish cell

StartCell

Start cell (if any)

Declaration
public CellFrame? StartCell { get; }
Property Value
Type Description
CellFrame

Start cell

Methods

ClearLastSolution()

Clears the last displayed solution

Declaration
public bool ClearLastSolution()
Returns
Type Description
bool

Boolean

CreateCellContent(CellFrame, int, int, bool)

Creates the maze cell content for a given location. If the grid is initializing, then cell content is returned that reflects the content of the maze item (if any) - otherwise, an empty cell is returned.

Declaration
public override ContentView CreateCellContent(CellFrame frame, int row, int column, bool gridInitializing)
Parameters
Type Name Description
CellFrame frame

Container frame

int row

Row index (zero-based)

int column

Column index (zero-based)

bool gridInitializing

Grid is initializing?

Returns
Type Description
ContentView

Maze cell content

Overrides
Grid.CreateCellContent(CellFrame, int, int, bool)

DisplaySolution(Solution)

Adds the path associated with the given solution to the display

Declaration
public bool DisplaySolution(Solution solution)
Parameters
Type Name Description
Solution solution

Maze solution

Returns
Type Description
bool

Boolean

GetCellContent(int, int)

Gets the maze cell content at a given location

Declaration
public MazeCellContent? GetCellContent(int row, int column)
Parameters
Type Name Description
int row

Row index (zero-based)

int column

Column index (zero-based)

Returns
Type Description
MazeCellContent

Maze cell content

GetCellType(int, int)

Gets the maze cell type at a given location

Declaration
public Maze.CellType GetCellType(int row, int column)
Parameters
Type Name Description
int row

Row index (zero-based)

int column

Column index (zero-based)

Returns
Type Description
Maze.CellType

Maze cell type

GetCurrentSelectionStatus()

Gets the current selection status

Declaration
public CellStatus GetCurrentSelectionStatus()
Returns
Type Description
CellStatus

Selection status

Initialize(bool, MazeItem?)

Initialize

Declaration
public void Initialize(bool enablePanSupport, MazeItem? mazeItem)
Parameters
Type Name Description
bool enablePanSupport

Enable pan support?

MazeItem mazeItem

Maze item (nullable)

OnCellDoubleTapped(CellFrame, bool)

Handles the cell double-tapped event

Declaration
public override void OnCellDoubleTapped(CellFrame cellFrame, bool triggerEvents)
Parameters
Type Name Description
CellFrame cellFrame

Cell frame

bool triggerEvents

Flag indicating whether to trigger further events

Overrides
Grid.OnCellDoubleTapped(CellFrame, bool)

OnCellTapped(CellFrame, bool)

Handles the cell tapped event

Declaration
public override void OnCellTapped(CellFrame cellFrame, bool triggerEvents)
Parameters
Type Name Description
CellFrame cellFrame

Cell frame

bool triggerEvents

Flag indicating whether to trigger further events

Overrides
Grid.OnCellTapped(CellFrame, bool)

OnProcessKeyDown(KeyState, Key, bool)

Handles the key down event

Declaration
public override void OnProcessKeyDown(KeyState state, Key key, bool triggerEvents)
Parameters
Type Name Description
KeyState state

Key state

Key key

Key pressed

bool triggerEvents

Flag indicating whether to trigger further events

Overrides
Grid.OnProcessKeyDown(KeyState, Key, bool)

OnSelectionChanged()

Handles the selection changed event

Declaration
public override void OnSelectionChanged()
Overrides
Grid.OnSelectionChanged()

SetSelectionContent(CellType)

Sets the content in the selected cells to the given cell type

Declaration
public void SetSelectionContent(Maze.CellType cellType)
Parameters
Type Name Description
Maze.CellType cellType

Cell type

ToMaze()

Converts the maze grid content to a Maze object

Declaration
public Maze ToMaze()
Returns
Type Description
Maze

Maze object

Events

CellDoubleTapped

Registered cell double-tapped event handler

Declaration
public event MazeGrid.CellDoubleTappedEventHandler? CellDoubleTapped
Event Type
Type Description
MazeGrid.CellDoubleTappedEventHandler

Event handler

CellTapped

Registered cell tapped event handler

Declaration
public event MazeGrid.CellTappedEventHandler? CellTapped
Event Type
Type Description
MazeGrid.CellTappedEventHandler

Event handler

KeyDown

Registered key down event handler

Declaration
public event MazeGrid.ProcessKeyDownEventHandler? KeyDown
Event Type
Type Description
MazeGrid.ProcessKeyDownEventHandler

Event handler

SelectionChanged

Registered selection changed event handler

Declaration
public event MazeGrid.SelectionChangedEventHandler? SelectionChanged
Event Type
Type Description
MazeGrid.SelectionChangedEventHandler

Event handler

Implements

INotifyPropertyChanged
IEffectControlProvider
IToolTipElement
IContextFlyoutElement
IAnimatable
IViewController
IVisualElementController
IElementController
IGestureController
IGestureRecognizers
IPropertyMapperView
IHotReloadableView
IReplaceableView
IBindableLayout
IVisualTreeElement
IGridLayout
ILayout
IView
IElement
ITransform
IContainer
IList<T>
ICollection<T>
IEnumerable<T>
IEnumerable
ISafeAreaView
IPadding
ICrossPlatformLayout
In this article
Back to top Generated by DocFX