Grid View

Represents a control that displays data items in rows and columns.

Properties

PropertyTypeDescription
BackgroundColorThe background color of the control.
BorderColorThe color of the control's border.
BorderThicknessFloatThe width of the control's border.
CornerRadiusIntegerThe radius for the corners of the control's border.
ForegroundColorThe color of the control's content.
ItemBackgroundColorThe background color of items.
ItemForegroundColorThe foreground color of items.
SelectedItemBackgroundColorThe background color of the selected item.
SelectedItemForegroundColorThe foreground color of the selected item.
IconPositionEnumThe position of the icon relative to the text. Possible values are Left, Right, & Top.
IconSizeFloatThe size of the icon in dp pixels.
IconSpacingFloatThe spacing between the icon and text.
ShowAsMonochromeBooleanA value that indicates whether the Foreground color is applied to the icon.
FontSizeFloatThe size of the text in dp pixels.
FontStyleEnumThe style in which the text is rendered. Possible values are Normal & Italic.
FontWeightEnumThe thickness of the specified font. Possible values are Thin, Light, Normal, Medium, Bold, Black
IconMemberPathStringThe name or path of the icon property that is displayed for each data item. Only applicable when ItemsSource bindings are used.
ItemsArrayThe collection used to generate the content of the control.
ItemsSourceBindingA binding to a JavaScript or JSON array.
SelectedValueObjectThe value of the selected item.
SelectedValuePathStringThe property path that is bound to the SelectedValue property. Only applicable when ItemsSource bindings are used.
TextMemberPathStringThe name or path of the text property that is displayed for each data item. Only applicable when ItemsSource bindings are used.
ColumnsIntegerThe number of columns that are in the grid. When -1 the property is ignored & will automatically allocate columns based on control & item sizes as well as available space
HorizontalSpacingFloatThe amount of separation between columns.
ItemHeightFloatThe height of the layout area for each item.
ItemPaddingThicknessThe amount of space between the content of the item and its border.
ItemWidthFloatThe width of the layout area for each item. When set to -1 the item will span the entire control width.
VerticalSpacingFloatThe amount of separation between rows.
HeightFloatThe suggested height of the control in dp pixels.
HorizontalAlignmentEnumThe horizontal alignment characteristics that are applied to the control when it is composed in a parent layout panel, such as a Grid.
HorizontalContentAlignmentEnumThe horizontal alignment of the control's content.
MarginThicknessThe outer margin that is applied to the control when it is composed in a parent layout panel, such as a Grid.
PaddingThicknessThe amount of space between the content of the control and its border.
RotationIntegerThe rotation about the Z-axis in degrees.
VerticalAlignmentEnumThe vertical alignment characteristics that are applied to the control when it is composed in a parent layout panel, such as a Grid.
VerticalContentAlignmentEnumThe vertical alignment of the control's content
WidthFloatThe suggested width of the control in dp pixels.
IsEnabledBooleanA value that indicates whether the user can interact with the control.
IsHitTestVisibleBooleanA value that indicates whether the contained area of the control can return true values for hit testing.
IsVisibleBooleanA value that indicates whether the control should be visible.
OpacityFloatA value between 0 and 1.0 that declares the opacity factor, with 1.0 meaning full opacity and 0 meaning transparent.

Events

EventDescription
LoadedOccurs when the element is laid out, rendered, and ready for interaction.
UnloadedOccurs when the element is no longer rendered on the screen.
SelectionChangedOccurs when the currently selected item changes.

Item Properties

PropertyTypeDescription
IconIconThe icon for the item.
TextStringA string that specifies the text contents of the item.
ValueStringThe value bound to the parent GridView's SelectedValue when this item is selected.
IsSelectedBooleanA value that indicates whether the item is currently selected.