-
-
Notifications
You must be signed in to change notification settings - Fork 2
Error with Grid Basic Usage Example in Docs #6
Description
Hi,
I noticed whilst looking at the docs for XenoAtom.Terminal.UI that on the Grid page the basic usage example contains a few issues.
When trying to copy the basic usage example with XenoAtom.Terminal.UI 2.2.0 onwards (including 2.5.0) in a project, Jetbrains Rider says that ColumnDefinition's constructor takes zero parameters whilst the usage examples shows the GridLength being provided as a parameter. The same is true for the RowDefinition constructor not accepting any parameters with the example showing a GridLength parameter used.
This is the basic usage example from the Grid page.
new Grid()
.Columns(new ColumnDefinition(GridLength.Auto), new ColumnDefinition(GridLength.Star))
.Rows(new RowDefinition(GridLength.Auto), new RowDefinition(GridLength.Auto))
.Cell("Name:", row: 0, column: 0)
.Cell(new TextBox("Alex"), row: 0, column: 1);And here are the error messages:
Constructor 'ColumnDefinition' has 0 parameter(s) but is invoked with 1 argument(s)
Constructor 'RowDefinition' has 0 parameter(s) but is invoked with 1 argument(s)
I believe this is the correct version of the basic usage example:
new Grid()
.Columns(new ColumnDefinition().Width(GridLength.Auto),
new ColumnDefinition().Width(GridLength.Star))
.Rows(new RowDefinition().Height(GridLength.Auto),
new RowDefinition().Height(GridLength.Auto))
.Cell("Name:", row: 0, column: 0)
.Cell(new TextBox("Alex"), row: 0, column: 1);Thanks for creating this project.