'宣言 Public Property Dialog As NavigationPaneOptionsDialog
public NavigationPaneOptionsDialog Dialog {get; set;}
このダイアログは、Cancel パラメーターを False に設定してイベントを終了した後、自動的に表示されます。ダイアログ ボックスを表示するためにこの参照の Show メソッドを呼び出す必要はありません。
このプロパティは主に、ダイアログの ResetButton プロパティにアクセスできるようにするために提供されています。これにより、リセット ボタンを表示したり、その Click イベントをリスニングしてリセット処理を提供したりできます。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Dim WithEvents dialogResetButton As Button Private Sub UltraExplorerBar1_NavigationOptionsDialogDisplaying(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinExplorerBar.CancelableNavigationOptionsDialogDisplayingEventArgs) Handles UltraExplorerBar1.NavigationOptionsDialogDisplaying ' To prevent the NavigationPaneOptionsDialog from displaying, uncomment the following line. 'e.Cancel = true ' If we haven't cancelled the dialog, enable the dialog's Reset button and listen to its Click event. If e.Cancel = False Then e.Dialog.ResetButton.Visible = True Me.dialogResetButton = e.Dialog.ResetButton Else ' Since we have cancelled the display of the built-in NavigationPaneOptionsDialog, display our ' own options dialog. Dim myNavigationOptionsDialog As MyNavigationOptionsDialog = New MyNavigationOptionsDialog() myNavigationOptionsDialog.ShowDialog(Me) End If End Sub Private Sub MyResetButtonEventHandler(ByVal sender As Object, ByVal e As EventArgs) Handles dialogResetButton.Click ' Perform custom reset processing here. End Sub Public Class MyNavigationOptionsDialog Inherits System.Windows.Forms.Form End Class
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void ultraExplorerBar1_NavigationOptionsDialogDisplaying(object sender, Infragistics.Win.UltraWinExplorerBar.CancelableNavigationOptionsDialogDisplayingEventArgs e) { // To prevent the NavigationPaneOptionsDialog from displaying, uncomment the following line. //e.Cancel = true; // If we haven't cancelled the dialog, enable the dialog's Reset button and listen to its Click event. if (e.Cancel == false) { e.Dialog.ResetButton.Visible = true; e.Dialog.ResetButton.Click += new EventHandler(this.MyResetButtonEventHandler); } else { // Since we have cancelled the display of the built-in NavigationPaneOptionsDialog, display our // own options dialog. MyNavigationOptionsDialog myNavigationOptionsDialog = new MyNavigationOptionsDialog(); myNavigationOptionsDialog.ShowDialog(this); } } private void MyResetButtonEventHandler(object sender, EventArgs e) { // Perform custom reset processing here. } public class MyNavigationOptionsDialog : Form { }