本文整理汇总了C#中Table.AddClass方法的典型用法代码示例。如果您正苦于以下问题:C# Table.AddClass方法的具体用法?C# Table.AddClass怎么用?C# Table.AddClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table.AddClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSliceHeaderTable
/// <summary>
/// Create a slice header table that will contain the slice key titles and values
/// </summary>
/// <param name="state">
/// The current state
/// </param>
/// <returns>
/// The slice header table
/// </returns>
protected Table CreateSliceHeaderTable(RendererState state)
{
var table = new Table();
table.AddClass(HtmlClasses.SliceKeys);
table.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
table.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
foreach (string key in state.Model.SliceKeys)
{
var row = new TableRow();
table.AddElement(row);
var value = state.InputRow[key] as string;
value = value ?? " ";
var title = new TableCell(state.Model.AllValidKeys[key]);
title.AddClass(HtmlClasses.SliceKeyTitle);
row.AddElement(title);
string text = this.GetLocalizedName(key, value);
var val = new TableCell();
// Implemented like in java to show description only
val.SetupDisplayText(value, text, key, DisplayMode.Description, false);
val.AddClass(HtmlClasses.SliceKeyValue);
row.AddElement(val);
}
return table;
}
示例2: CreateContainerTable
/// <summary>
/// Create the container table. The container table holds the slice header and slice data tables.
/// </summary>
/// <returns>
/// The table that holds the slice header and data
/// </returns>
private static Table CreateContainerTable()
{
var containerTable = new Table();
containerTable.AddClass(HtmlClasses.Container);
containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
var sliceRow = new TableRow();
containerTable.AddElement(sliceRow);
var skeys = new TableCell();
skeys.AddClass(HtmlClasses.SliceKeys);
sliceRow.AddElement(skeys);
var hvkeys = new TableRow(new TableCell());
hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys);
containerTable.AddElement(hvkeys);
return containerTable;
}
示例3: CreateSliceTable
/// <summary>
/// Create a <see cref="Table"/> object that will be used for slice tables
/// </summary>
/// <returns>
/// A slice Table
/// </returns>
protected static Table CreateSliceTable()
{
var table = new Table();
table.AddClass(HtmlClasses.HorizontalVerticalKeys);
table.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
table.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
return table;
}