Currently the pages are wrapped around, i.e. when one reaches the last pages and select next using the down arrow key the first page gets selected
Workaround:
Public Class MyRadPageView
Inherits RadPageView
Public Overrides Property ThemeClassName As String
Get
Return GetType(RadPageView).FullName
End Get
Set(value As String)
MyBase.ThemeClassName = value
End Set
End Property
Protected Overrides Function CreateUI() As RadPageViewElement
Select Case Me.ViewMode
Case PageViewMode.Stack
Return New RadPageViewStackElement()
Case PageViewMode.Outlook
Return New RadPageViewOutlookElement()
Case PageViewMode.ExplorerBar
Return New RadPageViewExplorerBarElement()
Case PageViewMode.Backstage
Return New MyRadPageViewBackstageElement()
Case Else
Return New RadPageViewStripElement()
End Select
End Function
End Class
Public Class MyRadPageViewBackstageElement
Inherits RadPageViewBackstageElement
Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
Get
Return GetType(RadPageViewBackstageElement)
End Get
End Property
Protected Overrides Function SelectNextItemCore(current As RadPageViewItem, forward As Boolean, wrap As Boolean) As Boolean
Return MyBase.SelectNextItemCore(current, forward, False)
End Function
Protected Overrides Sub ProcessKeyDown(e As KeyEventArgs)
If Me.IsNextKey(e.KeyCode) AndAlso Not Me.IsEditing Then
Me.SelectNextItem()
ElseIf Me.IsPreviousKey(e.KeyCode) AndAlso Not Me.IsEditing Then
Me.SelectPreviousItem()
ElseIf e.KeyCode = Keys.Home AndAlso Not Me.IsEditing Then
Me.Owner.SelectedPage = Nothing
Me.SetSelectedItem(Me.Items.First())
ElseIf e.KeyCode = Keys.End AndAlso Not Me.IsEditing Then
Me.Owner.SelectedPage = Nothing
Me.SetSelectedItem(Me.Items.Last())
ElseIf e.KeyCode = Keys.F2 Then
BeginEdit()
ElseIf e.KeyCode = Keys.Escape Then
CancelEdit()
ElseIf e.KeyCode = Keys.Enter AndAlso Me.IsEditing AndAlso Me.ActiveEditor.Validate() Then
EndEdit()
End If
End Sub
End Class