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

Open button disabled

3 Answers 66 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 1
Nikola asked on 27 Oct 2012, 01:06 PM
Hello,

This is my first time writing you here...and i think that your help is outstanding.

I have simple question, its maybe something basic that i don't understand..

If i put in docking area simple rad pane, with command binding for open...Open button will always be disabled.

/////////////////////////////////////////////////////////////
<telerik:RadPane Header="Pane 1">
                            <telerik:RadPane.CommandBindings>
                                <CommandBinding Command="Open" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute"/>
                            </telerik:RadPane.CommandBindings>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <telerik:RadToolBar MaxHeight="40" Grid.Row="0">
                                    <Button Command="telerik:RadDockingCommands.Close" Content="Close" MaxHeight="20" MaxWidth="40"/>
                                    <Button Command="Open" Content="Open" MaxHeight="20" MaxWidth="40"/>
                                </telerik:RadToolBar>
                            </Grid>
                        </telerik:RadPane>

private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            e.Handled = true;
        }


        private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
            e.Handled = true;
        }


////////////////////////////////////////

Thank you in advance

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 31 Oct 2012, 02:33 PM
Hi Nikola,

Thank you for contacting us.

We looked over the code snippets you sent to us and we are not sure what the Button with Command="Open" is supposed to do. If you want to implement a built-in command from docking you need to use the telerik:RadDockingCommands attached property but if you want to use a custom command you should implement it and then bind the Command property to it.

If you have any other questions do not hesitate to write to us again.

Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nikola
Top achievements
Rank 1
answered on 31 Oct 2012, 02:44 PM
Thank you for your respons

What i need is that every RadPane reacts on Ctrl + O or Button which is on RadPane.
Of course, that button should be disabled in some cases.
So why can't i put on every RadPane this command binding? Shouldn't it react on Open command?

0
Vladi
Telerik team
answered on 01 Nov 2012, 08:14 AM
Hi Nikola,

RadDocking control does not support a built-in functionality for keyboard shortcuts. We have logged it as a feature requests in our Public Issue Tracker System where you can track its status and vote for it.

If it get enough votes we may consider implementing it as a built-in functionality in the control.

Regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Nikola
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Nikola
Top achievements
Rank 1
Share this question
or