Class StackedColumn
Represents a column that is stacked across the specified child columns in it.
Inheritance
Implements
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class StackedColumn : BindableObject, IDisposable
Constructors
StackedColumn()
Initializes a new instance of the StackedColumn class to represents a column that are stacked across the specified child columns in it.
Declaration
public StackedColumn()
Fields
ChildColumnsProperty
Identifies the ChildColumns Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty ChildColumnsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the ChildColumns Xamarin.Forms.BindableProperty.
FontAttributeProperty
Identifies the FontAttribute Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty FontAttributeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the FontAttribute Xamarin.Forms.BindableProperty.
FontProperty
Identifies the Font Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty FontProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the Font Xamarin.Forms.BindableProperty.
MappingNameProperty
Identifies the MappingName Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty MappingNameProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the MappingName Xamarin.Forms.BindableProperty.
TemplateProperty
Identifies the Template Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty TemplateProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the Template Xamarin.Forms.BindableProperty.
TextAlignmentProperty
Identifies the TextAlignment Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty TextAlignmentProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the TextAlignment Xamarin.Forms.BindableProperty.
TextProperty
Identifies the Text Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the Text Xamarin.Forms.BindableProperty.
TextSizeProperty
Identifies the TextSize Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty TextSizeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
The identifier for the TextSize Xamarin.Forms.BindableProperty.
Properties
ChildColumns
Gets or sets the name of child columns that need to be stacked under the specified StackedColumn.
Declaration
public string ChildColumns { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that contains the column names to stacked under the particular category. The default value is |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.ChildColumns = "Order ID"+","+"CutomerName";
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
Font
Gets or sets the font family for the Content of header cell in the StackedColumn. The font family for the Content of header cells in the StackedColumn can be customized by using this property.
Declaration
public string Font { get; set; }
Property Value
Type | Description |
---|---|
System.String | The FontFamily for the Content of header cell in the column. The default value is "HelveticaNeue LT 55 Roman". |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.Font = “Helvetica Neue”;
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
FontAttribute
Gets or sets the Xamarin.Forms.FontAttributes that describes the font style for the Content of the header cell in the StackedColumn enables the user to apply different font attributes to the Content of the header cells using this property. The header text can be customized as bold or Italic using this property.
Declaration
public FontAttributes FontAttribute { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.FontAttributes | Represents the Xamarin.Forms.FontAttributes that describes the font style for the Content of the header cell in the StackedColumn. The default value is Xamarin.Forms.FontAttributes.None. |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.FontAttribute= FontAttributes.Bold;
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
MappingName
Gets or sets the mapping name of the StackedColumn.
Declaration
public string MappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the mapping name of the StackedColumn. The default value is null. |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.MappingName = "SalesDetails";
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
Template
Gets or sets the template used to display the header of the current StackedColumn. allows you to customize the header cell based on your requirement by using this property.
Declaration
public DataTemplate Template { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.DataTemplate | The template used to display the header of the current Stacked column. |
Examples
<syncfusion:SfDataGrid.StackedHeaderRows>
<syncfusion:StackedHeaderRow >
<syncfusion:StackedHeaderRow.StackedColumns>
<syncfusion:StackedColumn ChildColumns="OrderID,CustomerID, CustomerName, ShipCity,Country" Text="Sales Details" MappingName="SalesDetails">
<syncfusion:StackedColumn.Template>
<DataTemplate>
<Label Text="OrderID" TextColor="Black"
BackgroundColor="Yellow" YAlign="Center" />
</DataTemplate>
</syncfusion:StackedColumn.Template>
</syncfusion:StackedColumn>
</syncfusion:StackedHeaderRow.StackedColumns>
</syncfusion:StackedHeaderRow >
</syncfusion:SfDataGrid.StackedHeaderRows>
Text
Gets or sets the display text of the StackedColumn.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The display text of the stacked column header. The default value of header text is the MappingName of the stacked column. |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.Text = "Order ID";
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
TextAlignment
Gets or sets the Xamarin.Forms.TextAlignment for the header cell in the stacked column. The default alignment for the header cells in StackedColumn is center and you can customize this to Start or End.
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.TextAlignment | The Xamarin.Forms.TextAlignment for the header cell in the column. The default value is Xamarin.Forms.TextAlignment.Center. |
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.TextAlignment = TextAlignment.Start;
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
TextSize
Gets or sets the font size for the Content of header cell in the StackedColumn. The default value is 14. The font size for the content of header cell in the StackedColumn can be customized by using the this property.
Declaration
public double TextSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The font size for the Content of header cell in the StackedColumn. The default value is 14. |
Remarks
The font size for the Content of header cell in the StackedColumn can be customized by using the this property. However this property will not work if Template is used for a StackedColumn.
Examples
var stackedHeaderRow = new StackedHeaderRow();
StackedColumn column = new StackedColumn ();
column.TextSize= 16;
stackedHeaderRow.StackedColumns.Add(column);
dataGrid.StackedHeaderRows.Add(stackedHeaderRow);
Methods
Dispose()
Perform clean up before it is released from memory.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |