Table.CellSpacing プロパティ

定義

テーブル内のセルの間隔を取得または設定します。

public:
 property double CellSpacing { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
public double CellSpacing { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
member this.CellSpacing : double with get, set
Public Property CellSpacing As Double

プロパティ値

デバイス非依存のピクセル単位でのテーブル内のセルの間隔。

既定値は 2.0 です。

属性

次の例では、 が 0.35 センチメートルの単純な 2 x 3 テーブル CellSpacing を定義します。

<Table Background="Yellow" CellSpacing="0.35cm">
  <Table.Columns>
    <TableColumn /> <TableColumn /> <TableColumn />
  </Table.Columns>
  <TableRowGroup>
    <TableRow>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 1</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 2</Paragraph>
        <Paragraph>Cell at Row 1 Column 2</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 3</Paragraph>
      </TableCell>
    </TableRow>
    <TableRow>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 1</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 2</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 3</Paragraph>
      </TableCell>
    </TableRow>
  </TableRowGroup>
</Table>

この例の表示結果を次の図に示します。

スクリーンショット: [テーブル] セルの間隔

これに対し、次の図は、同じテーブルが既定のセル間隔 2 ピクセルでレンダリングされる方法を示しています。

スクリーンショット: [テーブル] セルの間隔

注釈

XAML 属性の使用方法

<object property="double"/>  
- or -  
<object property="qualifiedDouble"/>  

XAML 値

double
Double

0.0 以上で より小さいPositiveInfinity値の文字列表現Double。 非修飾値は、デバイスに依存しないピクセル単位で測定されます。 文字列に明示的に小数点を含める必要はありません。

qualifiedDouble
上で説明した double 値の後に、次のいずれかの単位指定子 px(、in、、 cmpt) が続きます。

px (既定値) はデバイスに依存しない単位 (1 ユニットあたり 1/96 インチ) です

in はインチ。1in==96px

cm はセンチメートルです。1cm==(96/2.54) px

pt はポイント。1pt==(96/72) px

依存プロパティ情報

識別子フィールド CellSpacingProperty
に設定されたメタデータ プロパティ true AffectsMeasure

適用対象