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

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

8 Answers 137 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Somesh
Top achievements
Rank 1
Somesh asked on 24 Nov 2010, 02:30 PM
Can we add more buttons in Rad Pane Title bar besides "close" button

8 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 24 Nov 2010, 05:34 PM
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
0
Somesh
Top achievements
Rank 1
answered on 24 Nov 2010, 06:34 PM
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;
        }
0
Somesh
Top achievements
Rank 1
answered on 26 Nov 2010, 02:30 PM
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;
        }
0
George
Telerik team
answered on 29 Nov 2010, 11:08 AM
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
0
Somesh
Top achievements
Rank 1
answered on 29 Nov 2010, 11:27 AM
Thanks George,
Your suggestion worked fine.

Thanks a lot.
0
Somesh
Top achievements
Rank 1
answered on 29 Nov 2010, 01:13 PM
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
0
George
Telerik team
answered on 01 Dec 2010, 02:00 PM
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
0
Somesh
Top achievements
Rank 1
answered on 01 Dec 2010, 06:13 PM
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,
Tags
Docking
Asked by
Somesh
Top achievements
Rank 1
Answers by
George
Telerik team
Somesh
Top achievements
Rank 1
Share this question
or