バージョン

KeyActionMappings プロパティ (UltraMonthViewMulti)

キーの押下と、そのときのキーのアクションとを関連付けるマッピングコレクションを返します。
シンタックス
'宣言
 
Public ReadOnly Property KeyActionMappings As KeyActionMappings
public KeyActionMappings KeyActionMappings {get;}
解説

KeyActionMappings プロパティは、押された CurrentState と修飾キー (Shift、CtrlおよびAlt) に基づいて、Infragistics.Win.UltraWinSchedule.MonthViewMulti.MonthViewMultiAction が特定の Keypress に関連付けられるかどうかを決定する Infragistics.Win.UltraWinSchedule.MonthViewMulti.KeyActionMapping オブジェクトのコレクションを返します。

次の表は、UltraMonthViewMulti コントロールのデフォルトのキーマッピングをリストしたものです。

KeyCode ActionCode StateRequired StateDisallowed SpecialKeysRequired SpecialKeysDisallowed
PreviousDay ActiveDay, VisibleMonths AltCtrl
NextDay ActiveDay, VisibleMonths AltCtrl
PreviousDayKeepSelection ActiveDay, VisibleMonths Ctrl Alt
NextDayKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Up SameDayInPreviousWeek ActiveDay, VisibleMonths AltCtrl
Down SameDayInNextWeek ActiveDay, VisibleMonths AltCtrl
Up SameDayInPreviousWeekKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Down SameDayInNextWeekKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Up ScrollPrevious VisibleMonths Alt Shift
Down ScrollNext VisibleMonths Alt Shift
Home FirstVisibleDayOfWeek ActiveDay, VisibleMonths AltCtrl
End LastVisibleDayOfWeek ActiveDay, VisibleMonths AltCtrl
Home FirstVisibleDayOfWeekKeepSelection ActiveDay, VisibleMonths Ctrl Alt
End LastVisibleDayOfWeekKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Home FirstDayOfMonth ActiveDay, VisibleMonths Alt Ctrl
End LastDayOfMonth ActiveDay, VisibleMonths Alt Ctrl
Home FirstDayOfMonthKeepSelection ActiveDay, VisibleMonths AltCtrl
End LastDayOfMonthKeepSelection ActiveDay, VisibleMonths AltCtrl
Prior SameDayInPreviousMonth ActiveDay, VisibleMonths AltCtrl
Next SameDayInNextMonth ActiveDay, VisibleMonths AltCtrl
Prior SameDayInPreviousMonthKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Next SameDayInNextMonthKeepSelection ActiveDay, VisibleMonths Ctrl Alt
Prior FirstVisibleDay ActiveDay, VisibleMonths Alt
Next LastVisibleDay ActiveDay, VisibleMonths Alt
Prior FirstVisibleDayKeepSelection ActiveDay, VisibleMonths AltCtrl
Next LastVisibleDayKeepSelection ActiveDay, VisibleMonths AltCtrl
Tab PreviousControl Shift AltCtrl
Tab NextControl すべて
Space ToggleDaySelection ActiveDay, VisibleMonths Ctrl Alt
Esc CloseMonthPopup MonthPopupDisplayed すべて

使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti

    Private Sub CustomizeKeyActionMappings()

        '	Create a new KeyActionMapping object, which we will add to
        '	the control's KeyActionMappings collection. The new KeyActionMapping
        '	object will have the following property settings:
        '
        '	KeyCode = Tab
        '	ActionCode = SameDayInNextMonth
        '	StateDisallowed = None
        '	StateRequired = ActiveDay
        '	SpecialKeysDisallowed = All (disallow the action if either Alt, Ctrl, or Shift is pressed)
        '	SpecialKeysRequired = 0 (no special keys required to perform the action)
        '
        Dim nextMonthMapping As KeyActionMapping = _
        New KeyActionMapping(Keys.Tab, MonthViewMultiAction.SameDayInNextMonth, 0, MonthViewMultiState.ActiveDay, SpecialKeys.All, 0)

        '	Create another new KeyActionMapping object, which we will add to
        '	the control's KeyActionMappings collection. The new KeyActionMapping
        '	object will have the following property settings:
        '
        '	KeyCode = Tab
        '	ActionCode = SameDayInPreviousMonth
        '	StateDisallowed = None
        '	StateRequired = ActiveDay
        '	SpecialKeysDisallowed = AltShift (disallow the action if either Alt or Shift is pressed)
        '	SpecialKeysRequired = Ctrl
        '
        Dim prevMonthMapping As KeyActionMapping = _
        New KeyActionMapping(Keys.Tab, MonthViewMultiAction.SameDayInPreviousMonth, 0, MonthViewMultiState.ActiveDay, SpecialKeys.AltShift, SpecialKeys.Ctrl)

        '	Remove all KeyActionMappings that use the Tab key
        Dim keyMapping As KeyActionMapping
        For Each keyMapping In Me.ultraMonthViewMulti1.KeyActionMappings
            If (keyMapping.KeyCode = Keys.Tab) Then
                Me.ultraMonthViewMulti1.KeyActionMappings.Remove(keyMapping)
            End If
        Next

        '	Now we can add the custom mappings
        Me.ultraMonthViewMulti1.KeyActionMappings.Add(nextMonthMapping)
        Me.ultraMonthViewMulti1.KeyActionMappings.Add(prevMonthMapping)

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.MonthViewMulti;


		private void CustomizeKeyActionMappings()
		{

			//	Create a new KeyActionMapping object, which we will add to
			//	the control's KeyActionMappings collection. The new KeyActionMapping
			//	object will have the following property settings:
			//
			//	KeyCode = Tab
			//	ActionCode = SameDayInNextMonth
			//	StateDisallowed = None
			//	StateRequired = ActiveDay
			//	SpecialKeysDisallowed = All (disallow the action if either Alt, Ctrl, or Shift is pressed)
			//	SpecialKeysRequired = 0 (no special keys required to perform the action)
			//
			KeyActionMapping nextMonthMapping =
				new KeyActionMapping( Keys.Tab,	//	KeyCode
												 MonthViewMultiAction.SameDayInNextMonth,		//	ActionCode
												 0,		//	StateDisallowed
												 MonthViewMultiState.ActiveDay,		//	StateRequired
												 SpecialKeys.All,	//	SpecialKeysDisallowed
												 0 		//	SpecialKeysRequired
												);
			
			//	Create another new KeyActionMapping object, which we will add to
			//	the control's KeyActionMappings collection. The new KeyActionMapping
			//	object will have the following property settings:
			//
			//	KeyCode = Tab
			//	ActionCode = SameDayInPreviousMonth
			//	StateDisallowed = None
			//	StateRequired = ActiveDay
			//	SpecialKeysDisallowed = AltShift (disallow the action if either Alt or Shift is pressed)
			//	SpecialKeysRequired = Ctrl
			//
			KeyActionMapping prevMonthMapping =
				new KeyActionMapping( Keys.Tab,	//	KeyCode
												 MonthViewMultiAction.SameDayInPreviousMonth,		//	ActionCode
												 0,		//	StateDisallowed
												 MonthViewMultiState.ActiveDay,		//	StateRequired
												 SpecialKeys.AltShift,	//	SpecialKeysDisallowed
												 SpecialKeys.Ctrl 		//	SpecialKeysRequired
												);
			
			//	Remove all KeyActionMappings that use the Tab key
			foreach( KeyActionMapping keyMapping in this.ultraMonthViewMulti1.KeyActionMappings )
			{
				if ( keyMapping.KeyCode == Keys.Tab )
					this.ultraMonthViewMulti1.KeyActionMappings.Remove( keyMapping );

			}

			//	Now we can add the custom mappings
			this.ultraMonthViewMulti1.KeyActionMappings.Add( nextMonthMapping );
			this.ultraMonthViewMulti1.KeyActionMappings.Add( prevMonthMapping );

		}
参照