Docking/RadPane disable keys

4 posts, 0 answers
  1. Socrates
    Socrates avatar
    2 posts
    Member since:
    Dec 2013

    Posted 30 Dec 2013 Link to this post

    Hello


    We have an application that uses RadDocking. If you try to resize the Panes (with the cursor) so that they take focus, it then allows you to resize them by using the arrow keys. Is there a way to disable this function (keyboard) as we use it for other stuff?

  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 02 Jan 2014 Link to this post

    Hello Socrates,

    Thank you for contacting us.

    The Docking control is using a RadGridResizer inside which inherits from the regular GridSplitter in order to resize its content. The explained behavior is the default GridSplitter behavior - it allows resizing by using the arrows when focused. However you can avoid that by inheriting our RadGridResizer and overriding the default KeyDown and KeyUp event handlers in the custom class. Afterwards you will need to replace everywhere RadGridResizer with the custom one in the used theme. For your convenience I have prepared and attached a sample project which demonstrates the exact approach.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Socrates
    Socrates avatar
    2 posts
    Member since:
    Dec 2013

    Posted 13 Jan 2014 Link to this post

    Thanks Kalin, this resolves the issue.
  5. Hiroshi
    Hiroshi avatar
    5 posts
    Member since:
    Nov 2013

    Posted 13 Mar 2015 Link to this post

    For the record, a better way to achieve so would be to set the Focusable property of the RadGridResizer to false:

    <Style TargetType="dock:RadGridResizer" BasedOn="{StaticResource {x:Type dock:RadGridResizer}}" />
        <Setter Property="Focusable" Value="False" />
    </Style>

    This will avoid you the pain of inheriting the RadGridResizer class, make a custom style for everything that use this control, override the mouse up/down events. etc.

    (Note: I've tested it in WPF only)
Back to Top