ToolTipsFactory

Object Model - Common Properties - BorderGradientMode

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

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

Property Value

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

Overridable

Layout-file

Description

This value defines the orientation of the linear gradient used to paint the tooltip border. It is only significant for layouts where Border=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: 

 

BorderGradient 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 BorderGradientMode directly for the component), the assigned value will become the default BorderGradientMode for the tooltips of all controls on the same form:

'Assign a new linear gradient mode to the tooltip component

Me.MultiLine.GetMultiLineToolTip(Panel1).BorderGradientMode = LinearGradientMode.Vertical

This default BorderGradientMode 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 BorderGradientMode 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 _

.BorderOverride.BorderGradientMode = LinearGradientMode.Vertical

Example 1

This statements define a linear gradient border at the component level. The individual colors of the BorderGradientColors-property are changed and a new BorderGradientMode is defined:

'define a linear gradient border for the tooltips provided by the component (MultiLine).

Me.MultiLine.Border = BorderStyle.LinearGradient

Me.MultiLine.BorderGradientMode = LinearGradientMode.Horizontal

Me.MultiLine.BorderWidth = 15  'make the border 15 pixel wide

'assign the start-color...

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

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

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

'Set a high gradient frequency to get a nicely striped border

Me.MultiLine.BorderGradientFrequency = 30