Class GridStyleInfo
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.CellGrid.Styles
Assembly: Syncfusion.SfCellGrid.WPF.dll
Syntax
public class GridStyleInfo : StyleInfoBase, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable
Constructors
GridStyleInfo()
Initalizes a new style object.
Declaration
public GridStyleInfo()
GridStyleInfo(GridStyleInfo)
Initalizes a new style object and copies all data from an existing style object.
Declaration
public GridStyleInfo(GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfo | style | The style object that contains the original data. |
GridStyleInfo(GridStyleInfoStore)
Initalizes a new style object and associates it with an existing GridStyleInfoStore.
Declaration
public GridStyleInfo(GridStyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfoStore | store | A GridStyleInfoStore that holds data for this GridStyleInfo. All changes in this style object will be saved in the GridStyleInfoStore object. |
GridStyleInfo(StyleInfoIdentityBase)
Initalizes a new style object and associates it with an existing GridStyleInfoIdentity.
Declaration
public GridStyleInfo(StyleInfoIdentityBase identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoIdentityBase | identity | A GridStyleInfoIdentity that holds the indentity for this GridStyleInfo. |
GridStyleInfo(StyleInfoIdentityBase, GridStyleInfoStore)
Initalizes a new style object and associates it with an existing GridStyleInfoIdentity.
Declaration
public GridStyleInfo(StyleInfoIdentityBase identity, GridStyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoIdentityBase | identity | A GridStyleInfoIdentity that holds the indentity for this GridStyleInfo. |
GridStyleInfoStore | store | A GridStyleInfoStore that holds data for this GridStyleInfo. All changes in this style object will be saved in the GridStyleInfoStore object. |
Fields
Empty
An empty style object.
Declaration
public static readonly GridStyleInfo Empty
Field Value
Type |
---|
GridStyleInfo |
Properties
AllowNull
Gets or sets the AllowNull property for editors.
Declaration
public bool AllowNull { get; set; }
Property Value
Type |
---|
System.Boolean |
Background
Gets or sets a background brush for the cell.
Declaration
public Brush Background { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
BaseStyle
Gets or sets the base style for this style instance with default values for properties that are not initialized for this style object.
Declaration
public string BaseStyle { get; set; }
Property Value
Type |
---|
System.String |
Borders
Gets or sets cell borders.
Declaration
public CellBordersInfo Borders { get; set; }
Property Value
Type |
---|
CellBordersInfo |
CellEditTemplate
Gets or sets the Edit DataTemplate for the cell.
Declaration
public DataTemplate CellEditTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
CellEditTemplateKey
Gets or sets the Edit DataTemplate Key for the cell.
Declaration
public string CellEditTemplateKey { get; set; }
Property Value
Type |
---|
System.String |
CellIdentity
Holds identity information such as row and column index for the current GridStyleInfo.
Declaration
public GridStyleInfoIdentity CellIdentity { get; set; }
Property Value
Type |
---|
GridStyleInfoIdentity |
CellItemTemplate
Gets or sets the Item DataTemplate for the cell
Declaration
public DataTemplate CellItemTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
CellItemTemplateKey
Gets or sets the Item DataTemplate Key for the cell.
Declaration
public string CellItemTemplateKey { get; set; }
Property Value
Type |
---|
System.String |
CellRenderer
Returns the associated
Declaration
public IGridCellRenderer CellRenderer { get; }
Property Value
Type |
---|
IGridCellRenderer |
CellRowColumnIndex
Declaration
public RowColumnIndex CellRowColumnIndex { get; }
Property Value
Type |
---|
RowColumnIndex |
CellType
Gets or sets the cell type information for the cell.
Declaration
public string CellType { get; set; }
Property Value
Type |
---|
System.String |
CellValue
Gets or sets the cell value information for the cell.
Declaration
public object CellValue { get; set; }
Property Value
Type |
---|
System.Object |
CellValue2
Gets or sets the cell value 2 information of the cell.
Declaration
public object CellValue2 { get; set; }
Property Value
Type |
---|
System.Object |
ColumnIndex
Declaration
public int ColumnIndex { get; }
Property Value
Type |
---|
System.Int32 |
ComboBoxEdit
Gets or sets the NumericEdit
Declaration
public GridComboBoxStyleInfo ComboBoxEdit { get; set; }
Property Value
Type |
---|
GridComboBoxStyleInfo |
Comment
Gets or sets the text that should appear in the cell comment tooltip.
Declaration
public string Comment { get; set; }
Property Value
Type |
---|
System.String |
CommentBrush
Determines the Color of Comment Triangle
Declaration
public Brush CommentBrush { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
CommentTemplate
Gets or sets the comment template.
Declaration
public DataTemplate CommentTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
ConditionalFormats
Gets or sets the conditionalformat information of cell
Declaration
public GridConditionalFormats ConditionalFormats { get; set; }
Property Value
Type |
---|
GridConditionalFormats |
CurrencyEdit
Gets or sets the CurrencyEdit
Declaration
public GridCurrencyStyleInfo CurrencyEdit { get; set; }
Property Value
Type |
---|
GridCurrencyStyleInfo |
DataValidationTooltip
Gets or sets the text that should appear in the cell DataValidation Tooltip.
Declaration
public string DataValidationTooltip { get; set; }
Property Value
Type |
---|
System.String |
DataValidationTooltipTemplate
Gets or sets the DataValidation Tooltip template.
Declaration
public DataTemplate DataValidationTooltipTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
DateTimeEdit
Gets or sets the DateTimeEdit
Declaration
public GridDateTimeEditStyleInfo DateTimeEdit { get; set; }
Property Value
Type |
---|
GridDateTimeEditStyleInfo |
Default
Declaration
public static GridStyleInfo Default { get; }
Property Value
Type |
---|
GridStyleInfo |
Description
Gets / sets the text that is shown in check box or pushbuttons.
Declaration
public string Description { get; set; }
Property Value
Type |
---|
System.String |
Enabled
Gets or sets a value indicating whether the cell can be activated as current cell or if the cell should be skipped when moving the current cell.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
---|
System.Boolean |
Font
Gets or sets the font information
Declaration
public GridFontInfo Font { get; set; }
Property Value
Type |
---|
GridFontInfo |
Foreground
Gets or sets a foreground brush for the cell.
Declaration
public Brush Foreground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Format
Gets or sets the format information of a cell.
Declaration
public string Format { get; set; }
Property Value
Type |
---|
System.String |
FormatProvider
Gets or sets the cell FormatProvider.
Declaration
public IFormatProvider FormatProvider { get; set; }
Property Value
Type |
---|
System.IFormatProvider |
FormattedText
Gets the value formatted with the Format mask and custom formatting of the
Declaration
public string FormattedText { get; }
Property Value
Type |
---|
System.String |
FormulaTag
Gets or sets the formula tag of the cell.
Declaration
public GridFormulaTag FormulaTag { get; set; }
Property Value
Type |
---|
GridFormulaTag |
GridModel
Declaration
public GridModel GridModel { get; }
Property Value
Type |
---|
GridModel |
HasAllowNull
Determines if AllowNull has been initialized for the current object.
Declaration
public bool HasAllowNull { get; }
Property Value
Type |
---|
System.Boolean |
HasBackground
Determines if Background has been initialized for the current object.
Declaration
public bool HasBackground { get; }
Property Value
Type |
---|
System.Boolean |
HasBaseStyle
Determines if BaseStyle has been initialized for the current object.
Declaration
public bool HasBaseStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasBorders
Determines if border information has been initialized for the current object.
Declaration
public bool HasBorders { get; }
Property Value
Type |
---|
System.Boolean |
HasCellEditTemplate
Determines if
Declaration
public bool HasCellEditTemplate { get; }
Property Value
Type |
---|
System.Boolean |
HasCellEditTemplateKey
Determines if
Declaration
public bool HasCellEditTemplateKey { get; }
Property Value
Type |
---|
System.Boolean |
HasCellItemTemplate
Determines if
Declaration
public bool HasCellItemTemplate { get; }
Property Value
Type |
---|
System.Boolean |
HasCellItemTemplateKey
Determines if
Declaration
public bool HasCellItemTemplateKey { get; }
Property Value
Type |
---|
System.Boolean |
HasCellType
Determines if CellType has been initialized for the current object.
Declaration
public bool HasCellType { get; }
Property Value
Type |
---|
System.Boolean |
HasCellValue
Determines if CellValue has been initialized for the current object.
Declaration
public bool HasCellValue { get; }
Property Value
Type |
---|
System.Boolean |
HasCellValue2
Determines if CellValue2 has been initialized for the current object.
Declaration
public bool HasCellValue2 { get; }
Property Value
Type |
---|
System.Boolean |
HasComboBox
Determines if ComboBoxEdit has been initialized for the current object.
Declaration
public bool HasComboBox { get; }
Property Value
Type |
---|
System.Boolean |
HasComment
Determines if Comment has been initialized for the current object.
Declaration
public bool HasComment { get; }
Property Value
Type |
---|
System.Boolean |
HasCommentBrush
Determines if CommentBrush has been initialized for the current object.
Declaration
public bool HasCommentBrush { get; }
Property Value
Type |
---|
System.Boolean |
HasCommentTemplate
Determines if CommentTemplate has been initialized for the current object.
Declaration
public bool HasCommentTemplate { get; }
Property Value
Type |
---|
System.Boolean |
HasConditionalFormats
Determines if conditionalformats has been initialized for the current object.
Declaration
public bool HasConditionalFormats { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyEdit
Determines if CurrencyEdit has been initialized for the current object.
Declaration
public bool HasCurrencyEdit { get; }
Property Value
Type |
---|
System.Boolean |
HasDataValidationTooltip
Determines if DataValidationTooltip has been initialized for the current object.
Declaration
public bool HasDataValidationTooltip { get; }
Property Value
Type |
---|
System.Boolean |
HasDataValidationTooltipTemplate
Determines if DataValidationTooltipTemplate has been initialized for the current object.
Declaration
public bool HasDataValidationTooltipTemplate { get; }
Property Value
Type |
---|
System.Boolean |
HasDateTimeEdit
Determines if DateTimeEdit has been initialized for the current object.
Declaration
public bool HasDateTimeEdit { get; }
Property Value
Type |
---|
System.Boolean |
HasDescription
Determines if Description has been initialized for the current object.
Declaration
public bool HasDescription { get; }
Property Value
Type |
---|
System.Boolean |
HasEnabled
Determines if Enableed information has been initialized for the current object.
Declaration
public bool HasEnabled { get; }
Property Value
Type |
---|
System.Boolean |
HasFont
Determines if font information has been initialized for the current object.
Declaration
public bool HasFont { get; }
Property Value
Type |
---|
System.Boolean |
HasForeground
Determines if text color has been initialized for the current object.
Declaration
public bool HasForeground { get; }
Property Value
Type |
---|
System.Boolean |
HasFormat
Determines if Format has been initialized for the current object.
Declaration
public bool HasFormat { get; }
Property Value
Type |
---|
System.Boolean |
HasFormatProvider
Determines if HasFormatProvider has been initialized for the current object.
Declaration
public bool HasFormatProvider { get; }
Property Value
Type |
---|
System.Boolean |
HasFormulaTag
Determines if FormulaTag has been initialized for the current object.
Declaration
public bool HasFormulaTag { get; }
Property Value
Type |
---|
System.Boolean |
HasHorizontalAlignment
Determines if HorizontalAlignment has been initialized for the current object.
Declaration
public bool HasHorizontalAlignment { get; }
Property Value
Type |
---|
System.Boolean |
HasHyperlink
Determines if Hyperlink has been initialized for the current object.
Declaration
public bool HasHyperlink { get; }
Property Value
Type |
---|
System.Boolean |
HasIsThreeState
Determines if IsThreeState has been initialized for the current object.
Declaration
public bool HasIsThreeState { get; }
Property Value
Type |
---|
System.Boolean |
HasNullValue
Determines if NullValue has been initialized for the current object.
Declaration
public bool HasNullValue { get; }
Property Value
Type |
---|
System.Boolean |
HasNumericEdit
Determines if NumericEdit has been initialized for the current object.
Declaration
public bool HasNumericEdit { get; }
Property Value
Type |
---|
System.Boolean |
HasPadding
Determines if padding has been initialized for the current object.
Declaration
public bool HasPadding { get; }
Property Value
Type |
---|
System.Boolean |
HasPercentEdit
Determines if PercentEdit has been initialized for the current object.
Declaration
public bool HasPercentEdit { get; }
Property Value
Type |
---|
System.Boolean |
HasReadOnly
Determines if Read-only information has been initialized for the current object.
Declaration
public bool HasReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
HasTag
Determines if Tag has been initialized for the current object.
Declaration
public bool HasTag { get; }
Property Value
Type |
---|
System.Boolean |
HasText
Determines if Text has been initialized for the current object.
Declaration
public bool HasText { get; }
Property Value
Type |
---|
System.Boolean |
HasTextTrimming
Determines if TextTrimming information has been initialized for the current object.
Declaration
public bool HasTextTrimming { get; }
Property Value
Type |
---|
System.Boolean |
HasTextWrapping
Determines if TextWrapping information has been initialized for the current object.
Declaration
public bool HasTextWrapping { get; }
Property Value
Type |
---|
System.Boolean |
HasTooltip
Determines if Tooltip has been initialized for the current object.
Declaration
public bool HasTooltip { get; }
Property Value
Type |
---|
System.Boolean |
HasTooltipTemplate
Determines if TooltipTemplate has been initialized for the current object.
Declaration
public bool HasTooltipTemplate { get; }
Property Value
Type |
---|
System.Boolean |
HasUpDownEdit
Determines if UpDownEdit has been initialized for the current object.
Declaration
public bool HasUpDownEdit { get; }
Property Value
Type |
---|
System.Boolean |
HasVerticalAlignment
Determines if VerticalAlignment has been initialized for the current object.
Declaration
public bool HasVerticalAlignment { get; }
Property Value
Type |
---|
System.Boolean |
HasWantsKeyInput
Determines if WantsKeyInput has been initialized for the current object.
Declaration
public bool HasWantsKeyInput { get; }
Property Value
Type |
---|
System.Boolean |
HorizontalAlignment
Gets or sets horizontal alignment of text in the cell.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.HorizontalAlignment |
Hyperlink
Gets or sets the Hyperlink property for Hyperlink cell renderer.
Declaration
public object Hyperlink { get; set; }
Property Value
Type |
---|
System.Object |
IsThreeState
Gets or sets the IsThreeState property for checkbox.
Declaration
public bool IsThreeState { get; set; }
Property Value
Type |
---|
System.Boolean |
NullValue
Gets or sets the NullValue property for editors.
Declaration
public object NullValue { get; set; }
Property Value
Type |
---|
System.Object |
NumericEdit
Gets or sets the NumericEdit
Declaration
public GridNumericStyleInfo NumericEdit { get; set; }
Property Value
Type |
---|
GridNumericStyleInfo |
Padding
Gets or sets cell padding.
Declaration
public Thickness Padding { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
PercentEdit
Gets or sets the PercentEdit
Declaration
public GridPercentStyleInfo PercentEdit { get; set; }
Property Value
Type |
---|
GridPercentStyleInfo |
ReadOnly
Gets or sets a value indicating whether cell contents can be modified by the user.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
RowIndex
Declaration
public int RowIndex { get; }
Property Value
Type |
---|
System.Int32 |
Store
The GridStyleInfoStore object that holds all the data for this style object.
Declaration
public GridStyleInfoStore Store { get; }
Property Value
Type |
---|
GridStyleInfoStore |
Tag
Gets or sets the custom tag you can associate with a cell.
Declaration
public object Tag { get; set; }
Property Value
Type |
---|
System.Object |
Text
Gets / sets the cellvalue as a string.
Declaration
public string Text { get; }
Property Value
Type |
---|
System.String |
TextTrimming
Gets or sets how text is trimmed when it exceeds the edges of the cell text rectangle.
Declaration
public TextTrimming TextTrimming { get; set; }
Property Value
Type |
---|
System.Windows.TextTrimming |
TextWrapping
Gets or sets a value indicating whether text should be wrapped when it does not fit into a single line.
Declaration
public TextWrapping TextWrapping { get; set; }
Property Value
Type |
---|
System.Windows.TextWrapping |
Tooltip
Gets or sets the text that should appear in the cell tooltip.
Declaration
public string Tooltip { get; set; }
Property Value
Type |
---|
System.String |
TooltipTemplate
Gets or sets the Tooltip template.
Declaration
public DataTemplate TooltipTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
UpDownEdit
Gets or sets the UpDownEdit
Declaration
public GridUpDownStyleInfo UpDownEdit { get; set; }
Property Value
Type |
---|
GridUpDownStyleInfo |
VerticalAlignment
Gets or sets vertical alignment of text in the cell.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.VerticalAlignment |
WantsKeyInput
Gets or sets the WantsKeyInput property for Template cell renderer.
Declaration
public bool WantsKeyInput { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
CreateSubObjectIdentity(StyleInfoProperty)
Declaration
public override StyleInfoSubObjectIdentity CreateSubObjectIdentity(StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoProperty | sip |
Returns
Type |
---|
StyleInfoSubObjectIdentity |
Overrides
GetDefaultStyle()
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type |
---|
StyleInfoBase |
Overrides
GetFormattedText(Object)
Return formatted text for the specified value.
Declaration
public string GetFormattedText(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be formatted. |
Returns
Type | Description |
---|---|
System.String | A string that holds the formatted text. |
GetOffLineCopy()
Creates a new GridStyleInfo and copies its cell and identity information from the current object. The new instance will be made offline so that changes in this style object are not be stored in the GridData
Declaration
public GridStyleInfo GetOffLineCopy()
Returns
Type | Description |
---|---|
GridStyleInfo | A new GridStyleInfo instance. |
Remarks
Lets a style object load base styles and default values but disables saving changes back to the grid. (see OnStyleChanged below)
GetText(Object)
Returns text for the specified value (ignoring any Format settings). CultureInfo.CurrentCulture is used for conversion to string.
Declaration
public string GetText(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be converted to string. |
Returns
Type | Description |
---|---|
System.String | A string that represents the value. |
ResetAllowNull()
Resets the AllowNull
Declaration
public void ResetAllowNull()
ResetBackground()
Resets Background.
Declaration
public void ResetBackground()
ResetBaseStyle()
Resets BaseStyle.
Declaration
public void ResetBaseStyle()
ResetBorders()
Resets the borders information.
Declaration
public void ResetBorders()
ResetCellEditTemplate()
Resets
Declaration
public void ResetCellEditTemplate()
ResetCellEditTemplateKey()
Resets
Declaration
public void ResetCellEditTemplateKey()
ResetCellItemTemplate()
Resets
Declaration
public void ResetCellItemTemplate()
ResetCellItemTemplateKey()
Resets
Declaration
public void ResetCellItemTemplateKey()
ResetCellType()
Resets CellType.
Declaration
public void ResetCellType()
ResetCellValue()
Resets CellValue.
Declaration
public void ResetCellValue()
ResetCellValue2()
Resets CellValue2.
Declaration
public void ResetCellValue2()
ResetComboBox()
Resets ComboBoxEdit
Declaration
public void ResetComboBox()
ResetComment()
Resets Comment.
Declaration
public void ResetComment()
ResetCommentBrush()
Resets CommentBrush.
Declaration
public void ResetCommentBrush()
ResetCommentTemplate()
Resets CommentTemplate.
Declaration
public void ResetCommentTemplate()
ResetConditionalFormats()
Resets conditional formats information.
Declaration
public void ResetConditionalFormats()
ResetCurrencyEdit()
Resets CurrencyEdit.
Declaration
public void ResetCurrencyEdit()
ResetDataValidationTooltip()
Resets DataValidationTooltip.
Declaration
public void ResetDataValidationTooltip()
ResetDataValidationTooltipTemplate()
Resets DataValidationTooltipTemplate.
Declaration
public void ResetDataValidationTooltipTemplate()
ResetDateTimeEdit()
Resets DateTimeEdit
Declaration
public void ResetDateTimeEdit()
ResetDescription()
Resets Description.
Declaration
public void ResetDescription()
ResetEnabled()
Resets Enabled information.
Declaration
public void ResetEnabled()
ResetFont()
Resets font information.
Declaration
public void ResetFont()
ResetForeground()
Resets text color information.
Declaration
public void ResetForeground()
ResetFormat()
Declaration
public void ResetFormat()
ResetFormatProvider()
Resets FormatProvider.
Declaration
public void ResetFormatProvider()
ResetFormulaTag()
Resets FormulaTag information.
Declaration
public void ResetFormulaTag()
ResetHorizontalAlignment()
Resets HorizontalAlignment.
Declaration
public void ResetHorizontalAlignment()
ResetHyperlink()
Resets the Hyperlink
Declaration
public void ResetHyperlink()
ResetIsThreeState()
Resets IsThreeState
Declaration
public void ResetIsThreeState()
ResetNullValue()
Resets the NullValue
Declaration
public void ResetNullValue()
ResetNumericEdit()
Resets NumericEdit
Declaration
public void ResetNumericEdit()
ResetPadding()
Resets padding information.
Declaration
public void ResetPadding()
ResetPercentEdit()
Resets PercentEdit.
Declaration
public void ResetPercentEdit()
ResetReadOnly()
Resets Read-only information.
Declaration
public void ResetReadOnly()
ResetTag()
Resets Tag.
Declaration
public void ResetTag()
ResetText()
Resets the Text property.
Declaration
public void ResetText()
ResetTextTrimming()
Resets TextTrimming information.
Declaration
public void ResetTextTrimming()
ResetTextWrapping()
Resets TextWrapping information.
Declaration
public void ResetTextWrapping()
ResetTooltip()
Resets Tooltip.
Declaration
public void ResetTooltip()
ResetTooltipTemplate()
Resets TooltipTemplate.
Declaration
public void ResetTooltipTemplate()
ResetUpDownEdit()
Resets UpDownEdit.
Declaration
public void ResetUpDownEdit()
ResetVerticalAlignment()
Resets VerticalAlignment.
Declaration
public void ResetVerticalAlignment()
ResetWantsKeyInput()
Resets the Hyperlink
Declaration
public void ResetWantsKeyInput()