Hi,
I have the following structure in my application:
RadOutlookBar
-RadOutlookBarItem
-RadPanelBar
-RadPanelBarItem
-RadTreeView (with Items)
So, a RadOutlookBar with a RadOutlookBarItem contains a RadPanelBar with RadPanelBarItems. The RadPanelBarItem contains a RadTreeView with RadTreeViewItems.
In the RadTreeView is also a RadContextMenu.
When I right-clicked on a TreeViewItem of the TreeView, the ContextMenus opened-event is fired and ContextMenu.GetClickedElement<RadTreeViewItem>(); will return the right RadTreeViewItem. Then I click on a MenuItem and the ItemClick-event is fired. So far, so good.
Well when I do this a second time, the ContextMenu.GetClickedElement<RadTreeViewItem>(); returns the RadPanelBarItem which contains the TreeView.
As I see the RadPanelBarItem inherits from the RadTreeViewItem and the documentation says, GetClickedElement<T>() will return the top-most element of T. I think this is an incorrect behavior, because it returns two different elements and the second time the top-most element of T.
The error occurs, when at the first time the ItemClick-event of the ContextMenu was fired, after a MenuItem was clicked.
Got it?
GetClickedElement<T>() should always return the last element (the innermost) of T or am I wrong?
Thanks,
Daniel
I have the following structure in my application:
RadOutlookBar
-RadOutlookBarItem
-RadPanelBar
-RadPanelBarItem
-RadTreeView (with Items)
So, a RadOutlookBar with a RadOutlookBarItem contains a RadPanelBar with RadPanelBarItems. The RadPanelBarItem contains a RadTreeView with RadTreeViewItems.
In the RadTreeView is also a RadContextMenu.
When I right-clicked on a TreeViewItem of the TreeView, the ContextMenus opened-event is fired and ContextMenu.GetClickedElement<RadTreeViewItem>(); will return the right RadTreeViewItem. Then I click on a MenuItem and the ItemClick-event is fired. So far, so good.
Well when I do this a second time, the ContextMenu.GetClickedElement<RadTreeViewItem>(); returns the RadPanelBarItem which contains the TreeView.
As I see the RadPanelBarItem inherits from the RadTreeViewItem and the documentation says, GetClickedElement<T>() will return the top-most element of T. I think this is an incorrect behavior, because it returns two different elements and the second time the top-most element of T.
The error occurs, when at the first time the ItemClick-event of the ContextMenu was fired, after a MenuItem was clicked.
Got it?
GetClickedElement<T>() should always return the last element (the innermost) of T or am I wrong?
Thanks,
Daniel