protected virtual void CreateList() { foreach (var i in Element.TemplatedItems()) { var c = i; var enabledStyle = CellStyle.GetEnabled(i); var disabledStyle = CellStyle.GetDisabled(i); var selectedStyle = CellStyle.GetSelected(i); ApplyEnabledOrDisabled(i, enabledStyle, disabledStyle, selectedStyle); var cntrl = (Panel)Renderer.Render(i).Result; cntrl.MouseUp += (s, e) => { if (Selected != null) { ApplyEnabledOrDisabled(Selected, enabledStyle, disabledStyle, selectedStyle); } ChangeSelected(this, Element, c); ApplySelected(c, enabledStyle, disabledStyle, selectedStyle); }; var cell = new TableCell(cntrl, true); var row = new TableRow(cell) { ScaleHeight = true }; Control.Rows.Add(row); } Control.Rows.Add(null); }