Element.CellKey 属性

定义

替代 GetCell 方法的子类也应重写此方法

protected virtual Foundation.NSString CellKey { get; }
member this.CellKey : Foundation.NSString

属性值

唯一的 NSString 值,通常基础值分配为静态变量。

注解

此方法应返回传递给 UITableView.DequeueReusableCell 的键。 如果代码重写 GetCell(UITableView) 方法以更改单元格,则还必须重写此方法并为其返回唯一键。 这适用于大多数子类,但有几个例外:StringElement 和各种派生类不使用此设置,因为它们需要更广泛的键才能用于不同的用途,因此,如果尝试替代 StringElement 或 StyledStringElement,则需要查看这些子类的源代码。

适用于