Breaking Change T825244
Visible to All Users

Text strings take into account font style settings from both Appearance properties and HTML tags

A font style (font weight, size and format) can be set in Appearance settings, and with HTML tags. Previously, all font style settings from Appearance properties were discarded for text blocks formatted with HTML tags. To apply both style sets, you had to manually turn the static StringParser.KeepFontStyle property on. Starting with version 19.2, this setting is enabled by default.

C#
simpleButton1.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True; simpleButton1.Appearance.FontStyleDelta = FontStyle.Bold; simpleButton1.Text = "One <i>Two</i> Three"; //v19.1 and earlier: "One" and "Three" are written in bold, "Two" is italic //v19.2 and newer: "One" and "Three" are bold, "Two" is bold and italic
Visual Basic
simpleButton1.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True simpleButton1.Appearance.FontStyleDelta = FontStyle.Bold simpleButton1.Text = "One <i>Two</i> Three" 'v19.1 and earlier: "One" and "Three" are written in bold, "Two" is italic 'v19.2 and newer: "One" and "Three" are bold, "Two" is bold and italic

To revert to the previous behavior, you can set StringParser.KeepFontStyle to false.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.