バージョン

RecentlyUsed プロパティ

ToolBase インスタンスが、ツール インスタンスが表示される PopupMenuTool で最近に使用されたツールのひとつであるかどうかを示す値を取得するまたは設定します。
シンタックス
'宣言
 
Public Property RecentlyUsed As Boolean
public bool RecentlyUsed {get; set;}

プロパティ値

現在のツール インスタンスが他のツールよりもより頻繁に使用される場合は True、そうでない場合は False。
例外
例外解説
System.NotSupportedExceptionプロパティは、基本の Form または UserControl で定義された UltraToolbarsManager 内のツールに対して、デザインタイムに修正されます。継承されたツールは、作成された Form または UserControl のデザイナーを通して、ランタイムまたはデザインタイムに修正される必要があります。
解説

UltraToolbarsManager.AlwaysShowFullMenus プロパティは、最近使用されていないツールが PopupMenuTools で常に表示されるかどうかを指定します。

最近使用されていないツールが非表示の場合に、メニューの一番下にあるインジケーターによって、ユーザーはメニューを展開しすべてのツールを確認できます。

使用例
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars

	Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick

		Debug.WriteLine("The Tool with key '" + e.Tool.Key + "' has been clicked.  It is of type: '" + e.Tool.GetType().ToString() + "'")


		' クリックされたツールのプロパティ情報を表示します
		Debug.IndentLevel += 1

		' ツールの InstanceProps オブジェクトのすべてのプロパティを表示します
		Debug.WriteLine("InstanceProps properties ------------------------------------------")


		If Not e.Tool.InstanceProps Is Nothing Then
			Debug.WriteLine("Caption: '" + e.Tool.InstanceProps.Caption)
			Debug.WriteLine("DisplayStyle: '" + e.Tool.InstanceProps.DisplayStyle.ToString())
			Debug.WriteLine("MaxWidth: '" + e.Tool.InstanceProps.MaxWidth.ToString())
			Debug.WriteLine("MinWidth: '" + e.Tool.InstanceProps.MinWidth.ToString())
			Debug.WriteLine("Width: '" + e.Tool.InstanceProps.Width.ToString())

			' InstanceProps.IsFirstInGroup
			If e.Tool.InstanceProps.IsFirstInGroup Then
				Debug.WriteLine("Tool has been marked as first in group (i.e., preceded by a tool separator). This setting may have been customized by the end user.  Use the tool's IsFirstInGroupResolved property to get its effective setting.")
			Else
				Debug.WriteLine("Tool has NOT been marked as first in group (i.e., preceded by a tool separator).  This setting may have been customized by the end user.  Use the tool's IsFirstInGroupResolved property to get its effective setting.")
			End If

			' InstanceProps.RecentlyUsed
			If e.Tool.InstanceProps.RecentlyUsed = True Then
				Debug.WriteLine("Tool will appear when menus are first displayed even if AlwaysShowFullMenus is set to false.  This setting may have been customized by the end user.  Use the tool's RecentlyUsedResolved property to get its effective setting.")
			Else
				Debug.WriteLine("Tool will NOT appear when menus are first displayed if AlwaysShowFullMenus is set to false.  This setting may have been customized by the end user.  Use the tool's RecentlyUsedResolved property to get its effective setting.")
			End If

			' InstanceProps.Spring
			If e.Tool.InstanceProps.Spring = DefaultableBoolean.True Then
				If e.Tool.OwnerIsToolbar And e.Tool.OwningToolbar.SettingsResolved.FillEntireRowResolved = True Then
					Debug.WriteLine("Tool will adjust its width if there is unused space on its parent toolbar.")
				Else
					Debug.WriteLine("Tool will NOT adjust its width since it is not on a toolbar that has its FillEntireRow property set to true.")
				End If
			Else
				Debug.WriteLine("Tool will NOT automatically adjust its width when placed on toolbars with unused space available.")
			End If

			' InstanceProps.Visible
			If e.Tool.InstanceProps.Visible = DefaultableBoolean.True Then
				Debug.WriteLine("Tool has been marked as Visible.  Use the tool's VisibleResolved property to get its effective setting since the tool may not be visible for other reaosns.")
			Else
				Debug.WriteLine("Tool has NOT been marked as Visible.")
			End If
		End If

		Debug.IndentLevel -= 1

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;

		private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
		{

			Debug.WriteLine("The Tool with key '" + e.Tool.Key + "' has been clicked.  It is of type: '" + e.Tool.GetType().ToString() + "'");


			// クリックされたツールのプロパティ情報を表示します
			Debug.IndentLevel++;


			// ツールの InstanceProps オブジェクトのすべてのプロパティを表示します
			Debug.WriteLine("InstanceProps properties ------------------------------------------");


			if (e.Tool.InstanceProps != null)
			{
				Debug.WriteLine("Caption: '" + e.Tool.InstanceProps.Caption);
				Debug.WriteLine("DisplayStyle: '" + e.Tool.InstanceProps.DisplayStyle.ToString());
				Debug.WriteLine("MaxWidth: '" + e.Tool.InstanceProps.MaxWidth.ToString());
				Debug.WriteLine("MinWidth: '" + e.Tool.InstanceProps.MinWidth.ToString());
				Debug.WriteLine("Width: '" + e.Tool.InstanceProps.Width.ToString());

				// InstanceProps.IsFirstInGroup
				if (e.Tool.InstanceProps.IsFirstInGroup)
					Debug.WriteLine("Tool has been marked as first in group (i.e., preceded by a tool separator). This setting may have been customized by the end user.  Use the tool's IsFirstInGroupResolved property to get its effective setting.");
				else
					Debug.WriteLine("Tool has NOT been marked as first in group (i.e., preceded by a tool separator).  This setting may have been customized by the end user.  Use the tool's IsFirstInGroupResolved property to get its effective setting.");


				// InstanceProps.RecentlyUsed
				if (e.Tool.InstanceProps.RecentlyUsed == true)
					Debug.WriteLine("Tool will appear when menus are first displayed even if AlwaysShowFullMenus is set to false.  This setting may have been customized by the end user.  Use the tool's RecentlyUsedResolved property to get its effective setting.");
				else
					Debug.WriteLine("Tool will NOT appear when menus are first displayed if AlwaysShowFullMenus is set to false.  This setting may have been customized by the end user.  Use the tool's RecentlyUsedResolved property to get its effective setting.");


				// InstanceProps.Spring
				if (e.Tool.InstanceProps.Spring == DefaultableBoolean.True)
				{
					if (e.Tool.OwnerIsToolbar && 
						e.Tool.OwningToolbar.SettingsResolved.FillEntireRowResolved == true)
						Debug.WriteLine("Tool will adjust its width if there is unused space on its parent toolbar.");
					else
						Debug.WriteLine("Tool will NOT adjust its width since it is not on a toolbar that has its FillEntireRow property set to true.");
				}
				else
					Debug.WriteLine("Tool will NOT automatically adjust its width when placed on toolbars with unused space available.");
			

				// InstanceProps.Visible
				if (e.Tool.InstanceProps.Visible == DefaultableBoolean.True)
					Debug.WriteLine("Tool has been marked as Visible.  Use the tool's VisibleResolved property to get its effective setting since the tool may not be visible for other reaosns.");
				else
					Debug.WriteLine("Tool has NOT been marked as Visible.");
			}

			Debug.IndentLevel--;

		}
参照