GrapeCity.Win.MultiRow Namespace > CellStyle Class : UseCompatibleTextRendering Property |
<SRCategoryAttribute("TextAppearance")> <SRDescriptionAttribute("Indicates whether to use the compatible text rendering engine (GDI+ or GDI). True means GDI+ rendering, and False means GDI rendering. If you want to use TextAngle, TextAdjustment, LineAdjustment, and TextVertical properties, set the UseCompatibleTextRendering to True. These four properties only are supported by GDI+ rendering.")> <DefaultValueAttribute()> <RefreshPropertiesAttribute(RefreshProperties.Repaint)> Public Property UseCompatibleTextRendering As MultiRowTriState
Dim instance As CellStyle Dim value As MultiRowTriState instance.UseCompatibleTextRendering = value value = instance.UseCompatibleTextRendering
[SRCategory("TextAppearance")] [SRDescription("Indicates whether to use the compatible text rendering engine (GDI+ or GDI). True means GDI+ rendering, and False means GDI rendering. If you want to use TextAngle, TextAdjustment, LineAdjustment, and TextVertical properties, set the UseCompatibleTextRendering to True. These four properties only are supported by GDI+ rendering.")] [DefaultValue()] [RefreshProperties(RefreshProperties.Repaint)] public MultiRowTriState UseCompatibleTextRendering {get; set;}
Exception | Description |
---|---|
System.ComponentModel.InvalidEnumArgumentException | The assigned value is not a MultiRowTriState value. |
Some characters have different appearances in different rendering engines. Because of GDI's limitations, the following CellStyle settings cannot take effect when UseCompatibleTextRendering is MultiRowTriState.False:
Note: |
---|
Some characters have different appearances in different rendering engines. Because of GDI's limitations, the following CellStyle settings cannot take effect when UseCompatibleTextRendering is MultiRowTriState.False: LineAdjustment, TextAdjustment, TextAngle, and TextVertical. |
void Form1_Load(object sender, EventArgs e) { // All cell's will use default cell style. gcMultiRow1.RowsDefaultCellStyle.BackColor = Color.Black; gcMultiRow1.RowsDefaultCellStyle.ForeColor = Color.White; gcMultiRow1.RowsDefaultCellStyle.SelectionBackColor = Color.FromArgb(100, SystemColors.Highlight); gcMultiRow1.RowsDefaultCellStyle.TextAlign = MultiRowContentAlignment.MiddleRight; // The cell's in alternating Rows gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientColors = new Color[] { Color.FromArgb(25, 25, 25), Color.FromArgb(75, 75, 75) }; gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientDirection = GradientDirection.Backward; gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientStyle = GradientStyle.Horizontal; // Row header cells gcMultiRow1.RowsDefaultHeaderCellStyle.BackColor = Color.FromArgb(75, 75, 75); gcMultiRow1.RowsDefaultHeaderCellStyle.ForeColor = Color.White; // column header cells. gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.BackColor = Color.FromArgb(75, 75, 75); gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.ForeColor = Color.FromArgb(200, 200, 200); gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.TextAlign = MultiRowContentAlignment.MiddleCenter; gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.UseCompatibleTextRendering = MultiRowTriState.True; gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.TextEffect = TextEffect.SunkenLite; // All cells in specific row. gcMultiRow1.Rows[0].DefaultCellStyle.PatternColor = Color.Gray; gcMultiRow1.Rows[0].DefaultCellStyle.PatternStyle = MultiRowHatchStyle.BackwardDiagonal; gcMultiRow1.Rows[0].DefaultCellStyle.Font = new Font(Control.DefaultFont, FontStyle.Underline); // Change single cell gcMultiRow1[0, 0].Style.UseCompatibleTextRendering = MultiRowTriState.True; gcMultiRow1[0, 0].Style.TextAngle = 30; gcMultiRow1[0, 0].Style.Format = "#0.00%"; }
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load ' All cell's will use default cell style. gcMultiRow1.RowsDefaultCellStyle.BackColor = Color.Black gcMultiRow1.RowsDefaultCellStyle.ForeColor = Color.White gcMultiRow1.RowsDefaultCellStyle.SelectionBackColor = Color.FromArgb(100, SystemColors.Highlight) gcMultiRow1.RowsDefaultCellStyle.TextAlign = MultiRowContentAlignment.MiddleRight ' The cell's in alternating Rows gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientColors = New Color() {Color.FromArgb(25, 25, 25), Color.FromArgb(75, 75, 75)} gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientDirection = GradientDirection.Backward gcMultiRow1.AlternatingRowsDefaultCellStyle.GradientStyle = GradientStyle.Horizontal ' Row header cells gcMultiRow1.RowsDefaultHeaderCellStyle.BackColor = Color.FromArgb(75, 75, 75) gcMultiRow1.RowsDefaultHeaderCellStyle.ForeColor = Color.White ' column header cells. gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.BackColor = Color.FromArgb(75, 75, 75) gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.ForeColor = Color.FromArgb(200, 200, 200) gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.TextAlign = MultiRowContentAlignment.MiddleCenter gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.UseCompatibleTextRendering = MultiRowTriState.True gcMultiRow1.ColumnHeadersDefaultHeaderCellStyle.TextEffect = TextEffect.SunkenLite ' All cells in specific row. gcMultiRow1.Rows(0).DefaultCellStyle.PatternColor = Color.Gray gcMultiRow1.Rows(0).DefaultCellStyle.PatternStyle = MultiRowHatchStyle.BackwardDiagonal gcMultiRow1.Rows(0).DefaultCellStyle.Font = New Font(Control.DefaultFont, FontStyle.Underline) ' Change single cell gcMultiRow1(0, 0).Style.UseCompatibleTextRendering = MultiRowTriState.True gcMultiRow1(0, 0).Style.TextAngle = 30 gcMultiRow1(0, 0).Style.Format = "#0.00%" End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2