Add more buttons in Rad Pane Title bar besides "close" button

9 posts, 0 answers
  1. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 24 Nov 2010 Link to this post

    Can we add more buttons in Rad Pane Title bar besides "close" button
  2. George
    Admin
    George avatar
    1332 posts

    Posted 24 Nov 2010 Link to this post

    Hello Somesh,

    Please, refer to the following topic in our online documentation - http://www.telerik.com/help/silverlight/raddocking-how-to-add-buttons-to-the-pane-headers.html
    I hope this helps. 

    Regards,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 24 Nov 2010 Link to this post

    Thanks for you reply,

    I had added a button in the Rad Pane Tile bar but on click of that button can i get the object of rad pane containing button

    i had tried following but i got radPane always equal to null.
    Is there any way to get the instance of rad pane on button click.

    private void CloseButton_Click(object sender, RoutedEventArgs e)
            {
                RadPane radPane = (sender as FrameworkElement).ParentOfType<RadPane>();
                if(radPane != null)
                      radPane.Hidden = true;
            }
  5. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 26 Nov 2010 Link to this post

    I had tried to add buttons in the header and Title of the RadPane using DataTemplate.

    In the header it is working fine but in case of title Title i am not getting the value of
    RadPane radPane = (sender
    as FrameworkElement).ParentOfType<RadPane>()= null
    in the below code
    and in case of header i am getting the value of
    RadPane radPane = (sender
    as FrameworkElement).ParentOfType<RadPane>()
    as mycontrol as required.

    Is there any way to get the instance of rad pane on button click.
    private void CloseButton_Click(object sender, RoutedEventArgs e)
            {
                RadPane radPane = (sender as FrameworkElement).ParentOfType<RadPane>();
                if(radPane != null)
                      radPane.Hidden = true;
            }
  6. George
    Admin
    George avatar
    1332 posts

    Posted 29 Nov 2010 Link to this post

    Hi Somesh,

    I would suggest you to get the RadPaneGroup, instead of the RadPane using the  ParentOfType<RadPaneGroup>(). In this way, you will get the RadPaneGroup, and you could get the RadPane using RadPaneGroup.SelectedPane property.

    I hope this helps.

    All the best,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  7. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 29 Nov 2010 Link to this post

    Thanks George,
    Your suggestion worked fine.

    Thanks a lot.
  8. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 29 Nov 2010 Link to this post

    Thanks for your reply George,
    It worked fine when RadPane is not in Floating state,
    but when we drag the radpane to make it float then it is not working as RadPaneGroup is not its Parent at this time.
    Can you help me for this issue,
    At floating state how can we get radpane on button click.

    Thanks in advance
  9. George
    Admin
    George avatar
    1332 posts

    Posted 01 Dec 2010 Link to this post

    Hi Somesh,

    Could you please send us a running sample project? It will help us in further pinpointing the problem. I will be glad to assist you further.

    Kind regards,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  10. Somesh
    Somesh avatar
    12 posts
    Member since:
    Aug 2010

    Posted 01 Dec 2010 Link to this post

    Thanks for your reply,

    I found the solution to find Radpane on button click
    by match button.Datatext.ToString() = RadPane.Title

    This solved my issue.

    Thanks,
Back to Top
DevCraft banner