Version

CaptionAreaImageSize Property

Gets/sets the size of the image that is displayed in the caption area. Applicable only when the Style property is set to 'WindowsLiveMessenger'.
Syntax
'Declaration
 
Public Property CaptionAreaImageSize As Size
public Size CaptionAreaImageSize {get; set;}
Remarks

Note: The image can be hidden by setting the CaptionImageSize property to Size.Empty.

Note: Changing properties of the UltraDesktopAlert component when one or more desktop alert windows are open is not recommended; such changes will not be fully applied for desktop alert windows that are currently open. The HasOpenWindows property should be used to determine whether any desktop alert windows are currently open for this instance before changing property values.

Example
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
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 );
        }
    }
Requirements

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

See Also