Version

CloseButtonVisible Property

Gets/sets whether the close button is displayed in the desktop alert window.
Syntax
'Declaration
 
Public Property CloseButtonVisible As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean CloseButtonVisible {get; set;}
Remarks

Clicking the close button causes the DesktopAlertClosing event to fire; if the event is not canceled, the desktop alert window is closed, and the DesktopAlertClosed event is fired.

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 CloseButtonVisible property can be used to control whether the end user has the ability to close the desktop alert window:

Imports Infragistics.Win
Imports Infragistics.Win.Misc

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.desktopAlert.CloseButtonVisible = IIf(allowClose, DefaultableBoolean.True, DefaultableBoolean.False)
    End Sub
using Infragistics.Win;
using Infragistics.Win.Misc;
using System.Diagnostics;


    private void Button1_Click(object sender, EventArgs e)
    {
        this.desktopAlert.CloseButtonVisible = allowClose ?
            DefaultableBoolean.True :
            DefaultableBoolean.False;
    }
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