Open button disabled

4 posts, 0 answers
  1. Nikola
    Nikola avatar
    6 posts
    Member since:
    Sep 2012

    Posted 27 Oct 2012 Link to this post

    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
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 31 Oct 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Nikola
    Nikola avatar
    6 posts
    Member since:
    Sep 2012

    Posted 31 Oct 2012 Link to this post

    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?

  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 01 Nov 2012 Link to this post

    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.

Back to Top