0
如果我得到這個INT 我可以把我的表的正確高度...獲取上TableSection條目數
所以我嘗試:
public class Test : ContentPage{
{...}
tableTest = new TableView {
Intent = TableIntent.Data,
BackgroundColor = Colors.WhiteTranslucent,
RowHeight = 40,
Root = new TableRoot {
new TableSection() {
new TextCell { Text = "Contato 1", TextColor = Color.Black, },
new TextCell { Text = "Contato 2", TextColor = Color.Black, },
},
},
};
layout.Children.Add (tableTest,
xConstraint: Constraint.RelativeToParent ((parent) => 0),
yConstraint: Constraint.RelativeToParent ((parent) => 150),
widthConstraint: Constraint.RelativeToParent ((parent) => parent.Width),
**heightConstraint: Constraint.RelativeToParent ((parent) => **(*GetEntryCell (0,0).* * contacts.RowHeight))**
);
{...}
TableSection GetEntryCell (int row, int column)
{
return (TableSection)contacts.Root [row] [column];
}
}
但我不有數...
在未來,我會得到它,因爲我會BD。 的,而我需要一個解決方案...
這一點,我用它來訪問表:
TableSection GetEntryCell (int row, int column);