Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
442 lines (400 sloc) 24.1 KB
<Type Name="Table" FullName="System.Windows.Documents.Table">
<TypeSignature Language="C#" Value="public class Table : System.Windows.Documents.Block, System.Windows.Markup.IAddChild" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi Table extends System.Windows.Documents.Block implements class System.Windows.Markup.IAddChild" />
<TypeSignature Language="DocId" Value="T:System.Windows.Documents.Table" />
<TypeSignature Language="VB.NET" Value="Public Class Table&#xA;Inherits Block&#xA;Implements IAddChild" />
<TypeSignature Language="C++ CLI" Value="public ref class Table : System::Windows::Documents::Block, System::Windows::Markup::IAddChild" />
<TypeSignature Language="F#" Value="type Table = class&#xA; inherit Block&#xA; interface IAddChild" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Documents.Block</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Windows.Markup.IAddChild</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Markup.ContentProperty("RowGroups")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>A block-level flow content element that provides a grid-based presentation organized by rows and columns.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Documents.Table> derives from the <xref:System.Windows.Documents.Block> element, and adheres to the common rules for containing a <xref:System.Windows.Documents.Block> element. A <xref:System.Windows.Documents.Table> element may be contained by any of the following elements:
- <xref:System.Windows.Documents.FlowDocument>
- <xref:System.Windows.Documents.TableCell>
- <xref:System.Windows.Controls.ListBoxItem>
- <xref:System.Windows.Controls.ListViewItem>
- <xref:System.Windows.Documents.Section>
- <xref:System.Windows.Documents.Floater>
- <xref:System.Windows.Documents.Figure>
> [!NOTE]
> <xref:System.Windows.Documents.Table> is similar to the <xref:System.Windows.Controls.Grid> element but has more capabilities and, therefore, requires greater resource overhead.
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=160053">WPF Controls Gallery Sample</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Table ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Table();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Documents.Table" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BeginInit">
<MemberSignature Language="C#" Value="public override void BeginInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void BeginInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.BeginInit" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub BeginInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void BeginInit();" />
<MemberSignature Language="F#" Value="override this.BeginInit : unit -&gt; unit" Usage="table.BeginInit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Called before an element is initialized.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CellSpacing">
<MemberSignature Language="C#" Value="public double CellSpacing { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 CellSpacing" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.Table.CellSpacing" />
<MemberSignature Language="VB.NET" Value="Public Property CellSpacing As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double CellSpacing { double get(); void set(double value); };" />
<MemberSignature Language="F#" Value="member this.CellSpacing : double with get, set" Usage="System.Windows.Documents.Table.CellSpacing" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the amount of spacing between cells in a table.</summary>
<value>The amount of spacing between cells in a table, in device independent pixels.
The default value is **2.0**.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="xamlAttributeUsage_CellSpacing"></a>
## XAML Attribute Usage
```
<object property="double"/>
- or -
<object property="qualifiedDouble"/>
```
<a name="xamlValues_CellSpacing"></a>
## XAML Values
*double*
<xref:System.Double>
String representation of a <xref:System.Double> value equal to or greater than **0.0** but smaller than <xref:System.Double.PositiveInfinity>. An unqualified value is measured in device independent pixels. Strings need not explicitly include decimal points.
*qualifiedDouble*
A *double* value as described above, followed by one of the following unit specifiers: `px`, `in`, `cm`, `pt`.
`px` (default) is [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]
`in` is inches; 1in==96px
`cm` is centimeters; 1cm==(96/2.54) px
`pt` is points; 1pt==(96/72) px
<a name="dependencyPropertyInfo_CellSpacing"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Documents.Table.CellSpacingProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
## Examples
The following example defines a simple 2 x 3 table with a <xref:System.Windows.Documents.Table.CellSpacing%2A> of 0.35 centimeters.
[!code-xaml[TableSnippets2#_Table_ColumnSpacing](~/samples/snippets/csharp/VS_Snippets_Wpf/TableSnippets2/CSharp/Window1.xaml#_table_columnspacing)]
The following figure shows how this example renders.
![Screenshot: Table cell spacing](~/add/media/table-cellspacing.png "Screenshot: Table cell spacing")
In contrast, the following figure shows how the same table renders with a default cell spacing of 2 pixels.
![Screenshot: Table cell spacing](~/add/media/table-cellspacingdefault.png "Screenshot: Table cell spacing")
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CellSpacingProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty CellSpacingProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty CellSpacingProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Documents.Table.CellSpacingProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly CellSpacingProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ CellSpacingProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable CellSpacingProperty : System.Windows.DependencyProperty" Usage="System.Windows.Documents.Table.CellSpacingProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Documents.Table.CellSpacing" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Columns">
<MemberSignature Language="C#" Value="public System.Windows.Documents.TableColumnCollection Columns { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Documents.TableColumnCollection Columns" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.Table.Columns" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Columns As TableColumnCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Documents::TableColumnCollection ^ Columns { System::Windows::Documents::TableColumnCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Columns : System.Windows.Documents.TableColumnCollection" Usage="System.Windows.Documents.Table.Columns" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Documents.TableColumnCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Windows.Documents.TableColumnCollection" /> object that contains the columns hosted by the table.</summary>
<value>A <see cref="T:System.Windows.Documents.TableColumnCollection" /> object that contains the columns (represented by <see cref="T:System.Windows.Documents.TableColumn" /> objects) hosted by the table. Note that this number might not be the actual number of columns rendered in the table. It is the <see cref="T:System.Windows.Documents.TableCell" /> objects in a table that determine how many columns are actually rendered.
This property has no default value.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Documents.TableColumn> objects returned by this property can, in conjunction with the <xref:System.Windows.Documents.TableCell> objects in the column, be used to define layout of columns but they do not determine the actual number of columns rendered. It is the <xref:System.Windows.Documents.TableCell> objects in a table that determine how many columns are actually rendered. For example, if you define 3 columns but only have table cells for 2 columns, only 2 columns will be rendered.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="EndInit">
<MemberSignature Language="C#" Value="public override void EndInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void EndInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.EndInit" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub EndInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void EndInit();" />
<MemberSignature Language="F#" Value="override this.EndInit : unit -&gt; unit" Usage="table.EndInit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Called immediately after an element is initialized.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LogicalChildren">
<MemberSignature Language="C#" Value="protected internal override System.Collections.IEnumerator LogicalChildren { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator LogicalChildren" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.Table.LogicalChildren" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides ReadOnly Property LogicalChildren As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LogicalChildren : System.Collections.IEnumerator" Usage="System.Windows.Documents.Table.LogicalChildren" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an enumerator that can be used to iterate the logical children of the <see cref="T:System.Windows.Documents.Table" />.</summary>
<value>An enumerator for the logical children of the <see cref="T:System.Windows.Documents.Table" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Child objects are enumerated in the following order:
1. Columns (represented by <xref:System.Windows.Documents.TableColumn> objects).
2. Row groups (represented by <xref:System.Windows.Documents.TableRowGroup> objects).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OnCreateAutomationPeer">
<MemberSignature Language="C#" Value="protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.OnCreateAutomationPeer" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function OnCreateAutomationPeer () As AutomationPeer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Automation::Peers::AutomationPeer ^ OnCreateAutomationPeer();" />
<MemberSignature Language="F#" Value="override this.OnCreateAutomationPeer : unit -&gt; System.Windows.Automation.Peers.AutomationPeer" Usage="table.OnCreateAutomationPeer " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Automation.Peers.AutomationPeer</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates and returns an <see cref="T:System.Windows.Automation.Peers.AutomationPeer" /> object for this <see cref="T:System.Windows.Documents.Table" />.</summary>
<returns>An <see cref="T:System.Windows.Automation.Peers.AutomationPeer" /> object for this <see cref="T:System.Windows.Documents.Table" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Windows.ContentElement.OnCreateAutomationPeer%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RowGroups">
<MemberSignature Language="C#" Value="public System.Windows.Documents.TableRowGroupCollection RowGroups { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Documents.TableRowGroupCollection RowGroups" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.Table.RowGroups" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RowGroups As TableRowGroupCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Documents::TableRowGroupCollection ^ RowGroups { System::Windows::Documents::TableRowGroupCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.RowGroups : System.Windows.Documents.TableRowGroupCollection" Usage="System.Windows.Documents.Table.RowGroups" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Documents.TableRowGroupCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Windows.Documents.TableRowGroupCollection" /> collection object that contains the row groups hosted by the table.</summary>
<value>A <see cref="T:System.Windows.Documents.TableRowGroupCollection" /> collection object that contains the row groups (represented by <see cref="T:System.Windows.Documents.TableRowGroup" /> objects) hosted by the table.
This property has no default value.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShouldSerializeColumns">
<MemberSignature Language="C#" Value="public bool ShouldSerializeColumns ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeColumns() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.ShouldSerializeColumns" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeColumns () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeColumns();" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeColumns : unit -&gt; bool" Usage="table.ShouldSerializeColumns " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a value that indicates whether or not the effective value of the <see cref="P:System.Windows.Documents.Table.Columns" /> property should be serialized during serialization of a <see cref="T:System.Windows.Documents.Table" /> object.</summary>
<returns>
<see langword="true" /> if the <see cref="P:System.Windows.Documents.Table.Columns" /> property should be serialized; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddChild">
<MemberSignature Language="C#" Value="void IAddChild.AddChild (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddChild(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.System#Windows#Markup#IAddChild#AddChild(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub AddChild (value As Object) Implements IAddChild.AddChild" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddChild(System::Object ^ value) = System::Windows::Markup::IAddChild::AddChild;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddChild(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The child object to add.</param>
<summary>Adds a child object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddText">
<MemberSignature Language="C#" Value="void IAddChild.AddText (string text);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddText(string text) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.Table.System#Windows#Markup#IAddChild#AddText(System.String)" />
<MemberSignature Language="VB.NET" Value="Sub AddText (text As String) Implements IAddChild.AddText" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddText(System::String ^ text) = System::Windows::Markup::IAddChild::AddText;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddText(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<param name="text">The text to add to the object.</param>
<summary>Adds the text content of a node to the object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.