Gets/sets the size of the image that is displayed in the caption area. Applicable only when the
Style property is set to 'WindowsLiveMessenger'.
The following code sample demonstrates how the appearance related properties of the UltraDesktopAlert component can be used to customize the appearance of all desktop alert windows displayed by the component:
Imports Infragistics.Win
Imports Infragistics.Win.Misc
Private Sub SetAppearances()
' Use the link appearances to get a consistent foreground color across
' all links, and also so the font attributes are realized through the
' formatting and not the appearances.
Dim normalLinkAppearance As New Infragistics.Win.Appearance()
normalLinkAppearance.FontData.Bold = DefaultableBoolean.False
normalLinkAppearance.FontData.Italic = DefaultableBoolean.False
normalLinkAppearance.FontData.Underline = DefaultableBoolean.False
normalLinkAppearance.ForeColor = SystemColors.WindowText
Me.desktopAlert.CaptionAppearance = normalLinkAppearance
Me.desktopAlert.TextAppearance = normalLinkAppearance
Me.desktopAlert.FooterTextAppearance = normalLinkAppearance
' Use the link hot track appearances to get a consistent foreground
' color across all links
Dim hotTrackLinkAppearance As New Infragistics.Win.Appearance()
hotTrackLinkAppearance.FontData.Bold = DefaultableBoolean.False
hotTrackLinkAppearance.FontData.Italic = DefaultableBoolean.False
hotTrackLinkAppearance.FontData.Underline = DefaultableBoolean.True
hotTrackLinkAppearance.ForeColor = Color.Blue
Me.desktopAlert.CaptionHotTrackAppearance = hotTrackLinkAppearance
Me.desktopAlert.TextHotTrackAppearance = hotTrackLinkAppearance
Me.desktopAlert.FooterTextHotTrackAppearance = hotTrackLinkAppearance
' Store the Appearance objects we created in the Appearances
' collection
Me.desktopAlert.Appearances.Add(normalLinkAppearance)
Me.desktopAlert.Appearances.Add(hotTrackLinkAppearance)
' Set the GripAreaAppearance or CaptionAreaAppearance depending
' on the resolved Style...the GripAreaAppearance applies to the
' Office2007 style, and the CaptionAreaAppearance applies to the
' WindowsLiveMessenger style.
If (Me.desktopAlert.StyleResolved = DesktopAlertStyle.Office2007) Then
Dim gripAreaAppearance As New Infragistics.Win.Appearance()
gripAreaAppearance.BackColor = Color.White
gripAreaAppearance.BackColor = Office2007ColorTable.Colors.ToolbarGradientLight
gripAreaAppearance.BackGradientStyle = GradientStyle.VerticalBump
Me.desktopAlert.GripAreaAppearance = gripAreaAppearance
Else
Dim captionAreaAppearance As New Infragistics.Win.Appearance()
captionAreaAppearance.BackColor = Color.AliceBlue
Me.desktopAlert.CaptionAreaAppearance = captionAreaAppearance
Me.desktopAlert.CaptionAreaImageSize = New Size(12, 12)
End If
End Sub
'Declaration
Public Property CaptionAreaImageSize As Size
using Infragistics.Win;
using Infragistics.Win.Misc;
using System.Diagnostics;
private void SetAppearances()
{
// Use the link appearances to get a consistent foreground color across
// all links, and also so the font attributes are realized through the
// formatting and not the appearances.
Infragistics.Win.Appearance normalLinkAppearance = new Infragistics.Win.Appearance();
normalLinkAppearance.FontData.Bold = DefaultableBoolean.False;
normalLinkAppearance.FontData.Italic = DefaultableBoolean.False;
normalLinkAppearance.FontData.Underline = DefaultableBoolean.False;
normalLinkAppearance.ForeColor = SystemColors.WindowText;
this.desktopAlert.CaptionAppearance = normalLinkAppearance;
this.desktopAlert.TextAppearance = normalLinkAppearance;
this.desktopAlert.FooterTextAppearance = normalLinkAppearance;
// Use the link hot track appearances to get a consistent foreground
// color across all links
Infragistics.Win.Appearance hotTrackLinkAppearance = new Infragistics.Win.Appearance();
hotTrackLinkAppearance.FontData.Bold = DefaultableBoolean.False;
hotTrackLinkAppearance.FontData.Italic = DefaultableBoolean.False;
hotTrackLinkAppearance.FontData.Underline = DefaultableBoolean.True;
hotTrackLinkAppearance.ForeColor = Color.Blue;
this.desktopAlert.CaptionHotTrackAppearance = hotTrackLinkAppearance;
this.desktopAlert.TextHotTrackAppearance = hotTrackLinkAppearance;
this.desktopAlert.FooterTextHotTrackAppearance = hotTrackLinkAppearance;
// Store the Appearance objects we created in the Appearances
// collection
this.desktopAlert.Appearances.Add( normalLinkAppearance );
this.desktopAlert.Appearances.Add( hotTrackLinkAppearance );
// Set the GripAreaAppearance or CaptionAreaAppearance depending
// on the resolved Style...the GripAreaAppearance applies to the
// Office2007 style, and the CaptionAreaAppearance applies to the
// WindowsLiveMessenger style.
if ( this.desktopAlert.StyleResolved == DesktopAlertStyle.Office2007 )
{
Infragistics.Win.Appearance gripAreaAppearance = new Infragistics.Win.Appearance();
gripAreaAppearance.BackColor = Color.White;
gripAreaAppearance.BackColor = Office2007ColorTable.Colors.ToolbarGradientLight;
gripAreaAppearance.BackGradientStyle = GradientStyle.VerticalBump;
this.desktopAlert.GripAreaAppearance = gripAreaAppearance;
}
else
{
Infragistics.Win.Appearance captionAreaAppearance = new Infragistics.Win.Appearance();
captionAreaAppearance.BackColor = Color.AliceBlue;
this.desktopAlert.CaptionAreaAppearance = captionAreaAppearance;
this.desktopAlert.CaptionAreaImageSize = new Size( 12, 12 );
}
}
'Declaration
Public Property CaptionAreaImageSize As Size
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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