Following are the breaking changes for StyleModel.
ColumnHeader/ RowHeader/ ColumnFooter Style Model |
In Spread WinForms v12, these models have been replaced with new internal models to gain more support from new calculation engine of SpreadCommon. In order to reuse the old logic assign DefaultSheetStyleModel to header models. For example: sheetView.Models.ColumnHeaderStyle = new DefaultSheetStyleModel(1,sheetView.ColumnCount,null,null); sheetView.Models.ColumnFooterStyle = new DefaultSheetStyleModel(1,sheetView.ColumnCount,null,null); sheetView.Models.RowHeaderStyle = new DefaultSheetStyleModel(sheetView.RowCount,1,null,null); |
New models in Spread WinForms 12 will implement interface INameStyleSupport. Hence, setting name of style to model will not work anymore. For example, FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.namedStyle("Mescius"); ns.BackColor = Color.Yellow; fpSpread1.NamedStyles.Add(ns); fpSpread1.ActiveSheet.RowHeader.DefaultStyleName = "Mescius"; //won't have effect MessageBox.Show(fpSpread1.ActiveSheet.RowHeader.DefaultStyleName); //return empty string //same for column header/footer |
|
In Spread WinForms 12, the Alternating style settings will no longer have any effect. |
Back to ColumnHeader/RowHeader/ColumnFooter.