ToolTipsFactory

Object Model - Additional Properties - FontGradientMode

Gets or sets a value that specifies the orientation of the linear gradient used to paint the tooltip text.

[Visual Basic]
Public Property FontGradientMode As LinearGradientMode
[C#]
public LinearGradientMode FontGradientMode {get; set;}

Property Value

Any value of the Drawing2D.LinearGradientMode-enumeration. Default value is LinearGradientMode.ForwardDiagonal.

Overridable

Layout-file

Property of
AnimationTT ImageTT SingleLineTT MultiLineTT

Description

This value defines the orientation of the linear gradient used to paint the tooltip text. It is only significant for layouts where TextStyle=LinearGradient. 

To be precise, this value defines the orientation of the axis along which the linear gradient is painted. The four possible values are listed in the following table together with a sample to illustrate it's impact on the layout: 

 

FontGradient settings Result
Specifies a gradient from left to right.
Specifies a gradient from top to bottom.
Specifies a gradient from upper left to lower right.
Specifies a gradient from upper right to lower left.

 

If specified at the component-level for a tooltip component (i.e. by defining the FontGradientMode directly for the component), the assigned value will become the default FontGradientMode for the tooltips of all controls on the same form:

'Assign a new linear gradient mode to the tooltip component

Me.MultiLine.GetMultiLineToolTip(Panel1) _

.FontGradientMode = LinearGradientMode.Vertical

This default FontGradientMode can be overridden for each control through the Override-property provided to all controls on the same form by the tooltip component (see "The Override-Property").

If the override-value for the FontGradientMode has to be set or changed at runtime for the tooltip of a specific control, code like the following is needed:

'Assign a new linear gradient mode to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.FontLayoutOverride.FontGradientMode = LinearGradientMode.Vertical

Example 1

This statements define a linear gradient font at the component level. The individual colors of the FontGradientColors-property are changed and a triangular FontGradientShape with the a centered focus is set:

'define a linear gradient font for the tooltips

'provided by the component (MultiLine).

Me.MultiLine.TextStyle = TextDrawingStyle.LinearGradient

Me.MultiLine.FontGradientMode = LinearGradientMode.Horizontal

'assign the start-color...

Me.MultiLine.FontGradientColors(0) = Color.OrangeRed 

'...and the end-color for the gradient.

Me.MultiLine.FontGradientColors(1) = Color.Blue

'set the gradient shape...

Me.MultiLine.FontGradientShape = GradientShape.Triangular

'...and it's focus position.

Me.MultiLine.FontGradientFocus = 0.5