{"record":{"id":"235405795c0d1229","repo":"dotnet/maui","slug":"the-layout-is-not-implemented","errorCode":null,"errorMessage":"The layout is not implemented","messagePattern":"The layout is not implemented","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/Compatibility/Core/src/Windows/CollectionView/StructuredItemsViewRenderer.cs","lineNumber":67,"sourceCode":"\t\t\telse if (changedProperty.Is(StructuredItemsView.ItemsLayoutProperty))\n\t\t\t{\n\t\t\t\tUpdateItemsLayout();\n\t\t\t}\n\t\t}\n\n\t\tprotected override ListViewBase SelectListViewBase()\n\t\t{\n\t\t\tswitch (Layout)\n\t\t\t{\n\t\t\t\tcase GridItemsLayout gridItemsLayout:\n\t\t\t\t\treturn CreateGridView(gridItemsLayout);\n\t\t\t\tcase LinearItemsLayout listItemsLayout when listItemsLayout.Orientation == ItemsLayoutOrientation.Vertical:\n\t\t\t\t\treturn CreateVerticalListView(listItemsLayout);\n\t\t\t\tcase LinearItemsLayout listItemsLayout when listItemsLayout.Orientation == ItemsLayoutOrientation.Horizontal:\n\t\t\t\t\treturn CreateHorizontalListView(listItemsLayout);\n\t\t\t}\n\n\t\t\tthrow new NotImplementedException(\"The layout is not implemented\");\n\t\t}\n\n\t\tprotected virtual void UpdateHeader()\n\t\t{\n\t\t\tif (ListViewBase == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_currentHeader != null)\n\t\t\t{\n\t\t\t\tElement.RemoveLogicalChild(_currentHeader);\n\t\t\t\t_currentHeader = null;\n\t\t\t}\n\n\t\t\tvar header = ItemsView.Header;\n\n\t\t\tswitch (header)","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/src/Compatibility/Core/src/Windows/CollectionView/StructuredItemsViewRenderer.cs#L49-L85","documentation":"Thrown as NotImplementedException by StructuredItemsViewRenderer.SelectListViewBase when the Layout switch does not match GridItemsLayout, LinearItemsLayout(Vertical), or LinearItemsLayout(Horizontal). The renderer only knows how to create a ListViewBase for those three layout configurations; any other ItemsLayout subclass falls through.","triggerScenarios":"Assigning a custom ItemsLayout subclass, or an ItemsLayout orientation/value not in the handled cases, to a StructuredItemsView (CollectionView/CarouselView). The switch has no default except the throw, so unhandled types always crash.","commonSituations":"Using a third-party or custom ItemsLayout; setting Layout to a new LinearItemsLayout with an unexpected Orientation value; or upgrading to a Maui version that adds a new ItemsLayout type the renderer hasn't been updated for.","solutions":["Use only GridItemsLayout or LinearItemsLayout (Vertical/Horizontal) with StructuredItemsView on WPF/Windows.","If a custom layout is needed, subclass StructuredItemsViewRenderer and override SelectListViewBase to handle it.","Check the Maui compatibility version — ensure the renderer version matches the Controls version for layout support."],"exampleFix":"// before\nitemsView.Layout = new CustomItemsLayout(); // not handled\n\n// after — use a supported layout type\nitemsView.Layout = new GridItemsLayout(2, ItemsLayoutOrientation.Vertical);","handlingStrategy":"validation","validationCode":"static bool IsSupportedLayout(ItemsLayout layout) =>\n    layout is GridItemsLayout ||\n    (layout is LinearItemsLayout linear &&\n     (linear.Orientation == ItemsLayoutOrientation.Vertical ||\n      linear.Orientation == ItemsLayoutOrientation.Horizontal));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only GridItemsLayout or LinearItemsLayout with StructuredItemsView on WPF/Windows.","Subclass the renderer and override SelectListViewBase if a custom layout is required."],"tags":["wpf","maui-compatibility","collectionview","itemslayout","renderer"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}