This is a migrated thread and some comments may be shown as answers.

Docking/RadPane disable keys

3 Answers 82 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Socrates
Top achievements
Rank 1
Socrates asked on 30 Dec 2013, 03:43 PM

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?

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 02 Jan 2014, 12:40 PM
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 >>
0
Socrates
Top achievements
Rank 1
answered on 13 Jan 2014, 01:02 PM
Thanks Kalin, this resolves the issue.
0
Hiroshi
Top achievements
Rank 1
answered on 13 Mar 2015, 08:08 AM
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)
Tags
Docking
Asked by
Socrates
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Socrates
Top achievements
Rank 1
Hiroshi
Top achievements
Rank 1
Share this question
or