Hi,
I'm trying to create a Context Menu in OOB. I am using version 2012.3.1224.1050. I have been able to create the Context Menu in browser but when I'm in OOB, I'm getting an error, 'Reference is not a valid visual DependencyObject.' when I'm trying to set the Context Menu IsOpen property to True. I'm using the Context Menu in a child window. Can you please explain what I'm doing wrong?
Example:
Dim oContextMenu As New Telerik.Windows.Controls.RadContextMenu
Dim lstMenuItem As New ObservableCollection(Of Telerik.Windows.Controls.RadMenuItem)
'Add Comment
oMenuItem = AddCommentToContextMenu()
'Display Context Menu
With oContextMenu
.ItemsSource = lstMenuItem
.IsOpen = True
.HorizontalOffset = oCurrentMousePosition.X
.VerticalOffset = oCurrentMousePosition.Y
End With
I'm trying to create a Context Menu in OOB. I am using version 2012.3.1224.1050. I have been able to create the Context Menu in browser but when I'm in OOB, I'm getting an error, 'Reference is not a valid visual DependencyObject.' when I'm trying to set the Context Menu IsOpen property to True. I'm using the Context Menu in a child window. Can you please explain what I'm doing wrong?
Example:
Dim oContextMenu As New Telerik.Windows.Controls.RadContextMenu
Dim lstMenuItem As New ObservableCollection(Of Telerik.Windows.Controls.RadMenuItem)
'Add Comment
oMenuItem = AddCommentToContextMenu()
'Display Context Menu
With oContextMenu
.ItemsSource = lstMenuItem
.IsOpen = True
.HorizontalOffset = oCurrentMousePosition.X
.VerticalOffset = oCurrentMousePosition.Y
End With