バージョン

ButtonAlignment プロパティ (UltraMessageBoxManager)

ボタン領域でボタンを水平方向に配置する方法を取得または設定します。
シンタックス
'宣言
 
Public Property ButtonAlignment As HAlign
public HAlign ButtonAlignment {get; set;}
使用例
Private Sub InitializeUltraMessageBoxManager() 
    ' Set the Style so the dialog resembles the MessageBox as displayed on Vista 
    Me.ultraMessageBoxManager1.Style = MessageBoxStyle.Vista 
    
    ' Set the general appearance of the dialog. 
    Me.ultraMessageBoxManager1.Appearance.ForeColor = Color.White 
    Me.ultraMessageBoxManager1.Appearance.BackColor = Color.Black 
    Me.ultraMessageBoxManager1.Appearance.BackColor2 = Color.Gray 
    Me.ultraMessageBoxManager1.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.ForwardDiagonal 
    Me.ultraMessageBoxManager1.Appearance.BackGradientAlignment = Infragistics.Win.GradientAlignment.Client 
    
    ' Change the alignment of the buttons 
    Me.ultraMessageBoxManager1.ButtonAlignment = Infragistics.Win.HAlign.Center 
    
    ' Turn off OS Themes so the ButtonAppearance modifications will be honored 
    Me.ultraMessageBoxManager1.UseOsThemes = Infragistics.Win.DefaultableBoolean.[False] 
    
    ' Change the appearance of the buttons. 
    Me.ultraMessageBoxManager1.ButtonAppearance.BackColor = SystemColors.ControlDarkDark 
    Me.ultraMessageBoxManager1.ButtonAppearance.ForeColor = Color.White 
    
    ' Define the maximum and minimum width of the dialog (in pixels) 
    Me.ultraMessageBoxManager1.MaximumWidth = 600         
    Me.ultraMessageBoxManager1.MinimumWidth = 400

    ' Disable the playing of the default sounds 
    Me.ultraMessageBoxManager1.EnableSounds = Infragistics.Win.DefaultableBoolean.[False] 
End Sub
private void InitializeUltraMessageBoxManager()
{
    // Set the Style so the dialog resembles the MessageBox as displayed on Vista
    this.ultraMessageBoxManager1.Style = MessageBoxStyle.Vista;

    // Set the general appearance of the dialog.
    this.ultraMessageBoxManager1.Appearance.ForeColor = Color.White;
    this.ultraMessageBoxManager1.Appearance.BackColor = Color.Black;
    this.ultraMessageBoxManager1.Appearance.BackColor2 = Color.Gray;
    this.ultraMessageBoxManager1.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.ForwardDiagonal;
    this.ultraMessageBoxManager1.Appearance.BackGradientAlignment = Infragistics.Win.GradientAlignment.Client;

    // Change the alignment of the buttons
    this.ultraMessageBoxManager1.ButtonAlignment = Infragistics.Win.HAlign.Center;

    // Turn off OS Themes so the ButtonAppearance modifications will be honored
    this.ultraMessageBoxManager1.UseOsThemes = Infragistics.Win.DefaultableBoolean.False;

    // Change the appearance of the buttons.
    this.ultraMessageBoxManager1.ButtonAppearance.BackColor = SystemColors.ControlDarkDark;
    this.ultraMessageBoxManager1.ButtonAppearance.ForeColor = Color.White;

    // Define the maximum and minimum width of the dialog (in pixels)
    this.ultraMessageBoxManager1.MaximumWidth = 600;
    this.ultraMessageBoxManager1.MinimumWidth = 400;

    // Disable the playing of the default sounds
    this.ultraMessageBoxManager1.EnableSounds = Infragistics.Win.DefaultableBoolean.False;
}
参照