Won't Fix
Last Updated: 11 Aug 2016 14:04 by ADMIN
ADMIN
Telerik Admin
Created on: 28 May 2012 13:33
Category: Docking
Type: Bug Report
3
When there is a ContextMenu attached to a control in an auto-hidden pane, the pane collapses when hovered over the menu
In WPF when show the unpined pane by hovering, when right click to show the contextmenu the pane collapses.
3 comments
ADMIN
Kalin
Posted on: 11 Aug 2016 10:37
If WPF ContextMenu is used (which doesn't have an Opening event), then it can be used the ContextMenuOpening event of RadPane. For example:

XAML:
<telerik:RadPane Header="Pane1" ContextMenuOpening="OnPane1ContextMenuOpening">
    <TextBlock Text="Sample Content">
        <TextBlock.ContextMenu>
            <ContextMenu>
                <MenuItem Header="Item 1" />
                <MenuItem Header="Item 2" />
            </ContextMenu>
        </TextBlock.ContextMenu>
    </TextBlock>
</telerik:RadPane>

Code behind:
private void OnPane1ContextMenuOpening(object sender, System.Windows.Controls.ContextMenuEventArgs e)
{
    (sender as RadPane).IsActive = true;
}

Regards,
Kalin
ADMIN
Kalin
Posted on: 31 May 2016 14:45
Hi,

For such scenarios the recommended approach is to hook to the ContextMenu Opening event and manually active the need Pane in order to keep it open. Please check the following snippet that demonstrates how this can be achieved using RadContextMenu:

private void OnRadContextMenuOpening(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    var clicked = (sender as RadContextMenu).GetClickedElement<FrameworkElement>();
    var pane = clicked.GetParentPane();
    if (pane != null)
    {
        pane.IsActive = true;
    }
}

Regards,
Kalin
Richard
Posted on: 06 Jan 2016 16:04
This bug's status is listed as "Approved". Is there any timeline on when it will actually be fixed and available?