Inconsistent radpane flyout and focus behaviour

2 posts, 1 answers
  1. Alex
    Alex avatar
    1 posts
    Member since:
    Nov 2016

    Posted 12 Dec 2016 Link to this post


    I have put together a small sample application which is a cut down version of my main application, both the sample application and main app are suffering from similar inconsistent flyout pane behaviour.

    If I click on the collapsed "Search" pane and then one of the grid's hyperlinks. It collapses immediately - this is a show stopper in my main application for when the search pane is collapsed.

    If I mouse hover on the search and don't click - I can click then click on the grid hyperlinks correctly - this is the same behaviour I want when the user clicks the search button.

    These are the main issues I'm facing - I can live with the behaviour presented by the toolbar and the datagrid context menu but ideally I want the pane to stay expanded while I interact with the context menu's

    Any advice would be appreciated.



    <Window x:Class="DockHidingIssue.MainWindow"
            Title="MainWindow" Height="768" Width="1024" d:DataContext="{d:DesignInstance dockHidingIssue:MainWindow}">

            <MenuItem x:Key="one" Header="First" Click="One_OnClick" />
            <MenuItem x:Key="two" Header="Second" Click="Two_OnClick" />
            <MenuItem x:Key="three" Header="Third" Click="Three_OnClick" />

            <ContextMenu x:Key="GridContextMenu">
                <MenuItem>Click me</MenuItem>
            <telerik:RadDocking Background="White" x:Name="MainDock"

                    <telerik:RadSplitContainer telerik:RadDocking.SerializationTag="HomePageContainer">
                        <telerik:RadPaneGroup BorderBrush="{x:Null}" BorderThickness="0"
                            <telerik:RadDocumentPane CanFloat="False" Visibility="Collapsed" CanUserClose="False"
                                <WebBrowser x:Name="Browser" />

                <telerik:RadSplitContainer InitialPosition="DockedBottom"
                    <telerik:RadPaneGroup telerik:RadDocking.SerializationTag="SearchGroup">
                        <telerik:RadPane Header="Search" x:Name="SearchRadPane"
                                         CanUserPin="True" IsPinned="False" MouseEnter="SearchRadPane_OnMouseEnter">

                            <TabControl TabStripPlacement="Bottom">
                                <TabItem Header="Search">
                                        <ToolBar x:Name="tbSelectorControl" ToolBarTray.IsLocked="True"
                                                 VerticalAlignment="Center" VerticalContentAlignment="Center">
                                            <Menu TabIndex="0" SnapsToDevicePixels="True" Background="Transparent">
                                                    <Style TargetType="MenuItem"
                                                           BasedOn="{StaticResource {x:Type MenuItem}}">
                                                        <Setter Property="Command"
                                                                Value="{Binding Path=Command, FallbackValue={x:Null}}" />
                                                <MenuItem x:Name="mnuSelected" SubmenuOpened="MnuSelected_OnSubmenuOpened">
                                                        <StackPanel Orientation="Horizontal" Height="30">
                                                            <Label x:Name="txtSelectedFinder" Content="Selected Finder"
                                                                   Height="30" />
                                                            <Image Height="8" Width="8"
                                                                   Margin="8,0,0,0" />

                                                    <MenuItem Header="Test" />
                                            <Separator />
                                        <DataGrid ItemsSource="{Binding Data}" AutoGenerateColumns="False"
                                                  ContextMenu="{StaticResource GridContextMenu}"
                                                <DataGridTextColumn Header="Name" />

                                                <DataGridHyperlinkColumn Header="Link" Binding="{Binding}" >

                                                            <EventSetter Event="Hyperlink.Click" Handler="Hyperlink_Click" />

                                <TabItem Header="Tasks">
                                    <Grid x:Name="MyTasks" />


    Code behind:


    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Runtime.CompilerServices;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    namespace DockHidingIssue
        /// <summary>
        ///     Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window, INotifyPropertyChanged
            private IEnumerable<string> _data;
            public MainWindow()
                DataContext = this;
                Data = new List<string>
            public IEnumerable<string> Data
                get { return _data; }
                    _data = value;
            public event PropertyChangedEventHandler PropertyChanged;
            private void FrameworkElement_OnContextMenuOpening(object sender, ContextMenuEventArgs e)
                (sender as FrameworkElement).Focus();
            private void One_OnClick(object sender, RoutedEventArgs e)
                Data = new List<string>
            private void Two_OnClick(object sender, RoutedEventArgs e)
                Data = new List<string>
            private void Three_OnClick(object sender, RoutedEventArgs e)
                Data = new List<string>
            protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
            private void MnuSelected_OnSubmenuOpened(object sender, RoutedEventArgs e)
                mnuSelected.Items.Add(Resources["one"] as MenuItem);
                mnuSelected.Items.Add(Resources["two"] as MenuItem);
                mnuSelected.Items.Add(Resources["three"] as MenuItem);
            private void SearchRadPane_OnMouseEnter(object sender, MouseEventArgs e)
            private void Hyperlink_Click(object sender, RoutedEventArgs e)
                var link = e.OriginalSource as Hyperlink;
                if (link != null)





  2. Answer
    Nasko avatar
    699 posts

    Posted 15 Dec 2016 Link to this post

    Hello Alex,

    The observed by you behavior is caused by the built-in FlyoutBehavior of RadDocking and it is an expected one with its current implementation. However, you could override that default FlyoutBehavior and prevent the Pane from closing when the hyperlink gets pressed. Please, check the following forum thread where you could find a detailed information how the behavior should be overridden:'t-work

    We have also implemented the described in the forum approach in your project - please, check the attached sample that demonstrates it.

    Hope this helps.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top