Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars
Private Sub UltraButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton3.Click
' UltraTaskPaneToolbar is a derived UltraToolbar so
' it must be cast to the derived type when retreived
' from the Toolbars collection of the component
Dim taskPane As UltraTaskPaneToolbar = CType(Me.UltraToolbarsManager1.Toolbars("TaskPaneDemo"), UltraTaskPaneToolbar)
' when the 'SelectedTaskPaneTool' property is set, the
' tool will be selected and its associated Control
' will be displayed in the content area of the task pane.
taskPane.SelectedTaskPaneTool = taskPane.Tools("dayview")
End Sub
Private Sub UltraToolbarsManager1_BeforeTaskPaneToolSelected(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.BeforeTaskPaneToolSelectedEventArgs) Handles UltraToolbarsManager1.BeforeTaskPaneToolSelected
' The BeforeTaskPaneToolSelected is invoked immediately before
' the 'SelectedTaskPaneTool' property of an UltraTaskPaneToolbar
' has been changed. This event is cancellable and can be used to
' prevent the selected task pane from being changed.
If e.Tool.Key = "monthview" Then
e.Cancel = True
End If
End Sub
Private Sub UltraToolbarsManager1_AfterTaskPaneToolSelected(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.TaskPaneToolbarEventArgs) Handles UltraToolbarsManager1.AfterTaskPaneToolSelected
' The AfterTaskPaneToolSelected event is invoked immediately after
' the 'SelectedTaskPaneTool' property of an UltraTaskPaneToolbar
' has been changed. This event can be used to initialize properties
' of a task pane tool or its associated control.
'
If Not e.TaskPaneToolbar.SelectedTaskPaneTool Is Nothing AndAlso Not e.TaskPaneToolbar.SelectedTaskPaneTool.Control Is Nothing Then
e.TaskPaneToolbar.SelectedTaskPaneTool.Control.Text = "Changed"
End If
End Sub