バージョン

IsInEditMode プロパティ

このツールが編集モードかどうかを返すか、設定します。
シンタックス
'宣言
 
Public Property IsInEditMode As Boolean
public bool IsInEditMode {get; set;}
解説

ツールが現在編集モードであるときに、このプロパティはTrueを返します。編集モードになるツールは、自動的にアクティブツールになります。コントロールがフォーカスを失うか、このプロパティを False に設定することによって、編集モードがコードによって終了されるまで、ツールは編集モードのままです。

使用例
Imports Infragistics.Win.UltraWinToolbars

    Private Sub ultraButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ultraButton1.Click
        Dim textTool As TextBoxTool = CType(Me.ultraToolbarsManager1.Tools("TextBoxTool1"), TextBoxTool)
        PutToolInEditMode(textTool)
    End Sub

    Private Shared Sub PutToolInEditMode(ByVal tool As ToolBase)
        ' only an editor tool can be put into edit mode. we need to
        ' also check for placeholder tools in case this is the mdi parent
        ' form's toolbarsmanager and the child toolbarmanager has the 
        ' editor tool
        If TypeOf tool Is EditorToolBase OrElse TypeOf tool Is MdiMergePlaceholderTool Then
            ' walk over all the instances of this tool - i.e. all of 
            ' the tools with the same key on different toolbars and
            ' menus
            Dim toolInstance As ToolBase
            For Each toolInstance In tool.SharedProps.ToolInstances
                ' access the underlying tool in case this is an
                ' place holder tool
                Dim editorTool As EditorToolBase = CType(toolInstance.UnderlyingTool, EditorToolBase)

                ' if the tool is currently in view and can be activated
                ' then we can try to put it into edit mode
                If Not editorTool Is Nothing AndAlso _
                    editorTool.CanActivate AndAlso _
                    editorTool.VisibleResolved Then

                    ' try to put the tool into edit mode
                    editorTool.IsInEditMode = True
                    Exit For

                End If
            Next
        End If
    End Sub
using Infragistics.Win.UltraWinToolbars;

		private void ultraButton1_Click(object sender, System.EventArgs e)
		{
			TextBoxTool textTool = this.ultraToolbarsManager1.Tools["TextBoxTool1"] as TextBoxTool;
			PutToolInEditMode( textTool );
		}

		private static void PutToolInEditMode(ToolBase tool)
		{
			// only an editor tool can be put into edit mode. we need to
			// also check for placeholder tools in case this is the mdi parent
			// form's toolbarsmanager and the child toolbarmanager has the 
			// editor tool
			if (tool is EditorToolBase || tool is MdiMergePlaceholderTool)
			{
				// walk over all the instances of this tool - i.e. all of 
				// the tools with the same key on different toolbars and
				// menus
				foreach(ToolBase toolInstance in tool.SharedProps.ToolInstances)
				{
					// access the underlying tool in case this is an
					// place holder tool
					EditorToolBase editorTool = toolInstance.UnderlyingTool as EditorToolBase;

					// if the tool is currently in view and can be activated
					// then we can try to put it into edit mode
					if (null != editorTool		&& 
						editorTool.CanActivate	&&
						editorTool.VisibleResolved)
					{
						// try to put the tool into edit mode
						editorTool.IsInEditMode = true;
						break;
					}
				}
			}
		}
参照