13 Answers, 1 is accepted
0
Jonathan
Top achievements
Rank 2
answered on 03 Jun 2009, 04:36 PM
telerik?
is it possible to attach an icon to the title of a pane?
/jonathan
is it possible to attach an icon to the title of a pane?
/jonathan
0
Hi Jonathan,
Yes you can show Icon on Pane's header. You need to use the Header and HeaderTemplate properties of the Pane. The attached example demonstrates two approaches of doing that.
Kind regards,
Miroslav Nedyalkov
the Telerik team
Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Kind regards,
Miroslav Nedyalkov
the Telerik team
Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
iven
Top achievements
Rank 1
answered on 13 Jul 2009, 10:12 AM
Hi Telerik,
Both methods of the sample code are not work for panels in DocumentHost, is there any way to work for it?
I attached my code as following, please give me some suggestions, many thanks.
Method 1:
The panel header does not display the content of the StackPanel, its display is "System.Windows.Controls.StackPanel", I'm very confused.
Method 2:
in the XAML:
and in the code behind of C#:
viewData is one instance of inner class ViewData which inludes a public property ViewCaption, somehow, the viewPane does not show the viewData.ViewCaption as expected, it just display the header text as blank, actually viewData.ViewCaption has a specified value "ViewPane". what's wrong?
Any suggestions, many thanks.
Both methods of the sample code are not work for panels in DocumentHost, is there any way to work for it?
I attached my code as following, please give me some suggestions, many thanks.
Method 1:
... |
<dock:RadDocking.DocumentHost> |
<dock:RadSplitContainer> |
<dock:RadPaneGroup TabStripPlacement="Bottom" > |
<dock:RadPane> |
<dock:RadPane.Header> |
<StackPanel Orientation="Horizontal"> |
<Image Source="Icon.jpg" Width="16" Height="16" /> |
<TextBlock Text="ViewPane" /> |
</StackPanel> |
</dock:RadPane.Header> |
</dock:RadPane> |
</dock:RadPaneGroup> |
</dock:RadSplitContainer> |
</dock:RadDocking.DocumentHost> |
The panel header does not display the content of the StackPanel, its display is "System.Windows.Controls.StackPanel", I'm very confused.
Method 2:
in the XAML:
.... |
<dock:RadDocking.DocumentHost> |
<dock:RadSplitContainer> |
<dock:RadPaneGroup x:Name="ViewTab" > |
<dock:RadPane> |
<dock:RadPane.HeaderTemplate> |
<DataTemplate> |
<StackPanel Orientation="Horizontal"> |
<TextBlock Text="{Binding ViewCaption}" /> |
</StackPanel> |
</DataTemplate> |
</dock:RadPane.HeaderTemplate> |
</dock:RadPane> |
</dock:RadPaneGroup> |
</dock:RadSplitContainer> |
</dock:RadDocking.DocumentHost> |
... |
and in the code behind of C#:
RadPane viewPane = ViewTab.Items[0] as RadPane; |
viewPane.DataContext=viewData; |
viewData is one instance of inner class ViewData which inludes a public property ViewCaption, somehow, the viewPane does not show the viewData.ViewCaption as expected, it just display the header text as blank, actually viewData.ViewCaption has a specified value "ViewPane". what's wrong?
Any suggestions, many thanks.
0
iven
Top achievements
Rank 1
answered on 14 Jul 2009, 04:47 PM
Telerik?
Any suggestion for the issue I reported?
Any suggestion for the issue I reported?
0
Hi iven,
You can set a custom header template following this code snippet:
Also your object has to implement the INotifyPropertyChanged interface in order to bind it to the Header property of the RadPane control.
Greetings,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can set a custom header template following this code snippet:
<telerikDocking:RadDocking.DocumentHost> |
<telerikDocking:RadSplitContainer> |
<telerikDocking:RadPaneGroup TabStripPlacement="Bottom"> |
<telerikDocking:RadPane> |
<telerikDocking:RadPane.HeaderTemplate> |
<DataTemplate> |
<StackPanel Orientation="Horizontal"> |
<Image Source="Icon.jpg" Width="16" Height="16" /> |
<TextBlock Text="ViewPane" /> |
</StackPanel> |
</DataTemplate> |
</telerikDocking:RadPane.HeaderTemplate> |
</telerikDocking:RadPane> |
</telerikDocking:RadPaneGroup> |
</telerikDocking:RadSplitContainer> |
</telerikDocking:RadDocking.DocumentHost> |
Also your object has to implement the INotifyPropertyChanged interface in order to bind it to the Header property of the RadPane control.
Greetings,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
iven
Top achievements
Rank 1
answered on 15 Jul 2009, 01:20 PM
Hi Kaloyan,
Thanks for your reply.
But in the HeaderTemplate you suggested, the text of the TextBlock is fixed, I want to change the text at runtime, meanwhile, I want the header includes icon, and close button, however, in the HeaderTemplate, binding the text of TextBlock does not work, it just displays blank, so any suggestions?
thanks.
Thanks for your reply.
But in the HeaderTemplate you suggested, the text of the TextBlock is fixed, I want to change the text at runtime, meanwhile, I want the header includes icon, and close button, however, in the HeaderTemplate, binding the text of TextBlock does not work, it just displays blank, so any suggestions?
thanks.
0
Hello iven,
Currently, there is a bug appearing when trying to set the binding to the Header or Title of the RadPane. We are working to eliminate this limitation end will provide you with a working version for one of the upcoming releases. Attached you can find an application showing a workaround application. Hope this will help you.
Greetings,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently, there is a bug appearing when trying to set the binding to the Header or Title of the RadPane. We are working to eliminate this limitation end will provide you with a working version for one of the upcoming releases. Attached you can find an application showing a workaround application. Hope this will help you.
Greetings,
Kaloyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
iven
Top achievements
Rank 1
answered on 16 Jul 2009, 03:48 PM
Hi Kaloyan,
It is weird, but works fine. thanks a lot.
It is weird, but works fine. thanks a lot.
0
Robert Pelzer
Top achievements
Rank 2
answered on 07 Oct 2009, 10:11 PM
Has the binding bug to the header of a pane been corrected with the latest release as of 10/7/2009?
I am wanting to update the header of the rad pane with the name of the user once they've logged in.
I am wanting to update the header of the rad pane with the name of the user once they've logged in.
0
Hi Ryan,
You could download the latest internal build version from this week (that should be released by the end of tomorrow) as we have some more fixes included.
Best wishes,
Miroslav Nedyalkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Best wishes,
Miroslav Nedyalkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Nathan J Pledger
Top achievements
Rank 2
answered on 05 Nov 2009, 11:00 AM
Hi,
I ahve just installed Q3 2009 controls and what was working is now leaving "System.Windows.Controls.StackPanel" in the heder instead of the icon and text. Here is my code:
private static void SetPaneHeader(IViewPane viewPane, RadPane pane) |
{ |
if (string.IsNullOrEmpty(viewPane.ImageResourceUrl)) |
{ |
//pane.Header = viewPane.PaneTitle; |
pane.Title = viewPane.PaneTitle; |
} |
else |
{ |
StackPanel stackPanel = new StackPanel() { Orientation = Orientation.Horizontal }; |
Image image = new Image() |
{ |
Source=(ImageSource)new ImageSourceConverter().ConvertFromString(viewPane.ImageResourceUrl) |
}; |
stackPanel.Children.Add(image); |
TextBlock textBlock = new TextBlock() { Text = viewPane.PaneTitle, Margin = new Thickness(3, 0, 0, 0) }; |
stackPanel.Children.Add(textBlock); |
pane.Header = stackPanel; |
//pane.Title = viewPane.PaneTitle; |
} |
} |
Am I doing something wrong for the Q3 release?
I've attached an image to show what I mean. The top tab does not have an icon, so just displays text, the bottom one does, so should render a StackPanel?
Thanks
0
Nathan J Pledger
Top achievements
Rank 2
answered on 05 Nov 2009, 11:25 AM
Hi,
Actually, cancel that. I realised I need to manually reinstate the StackPanel on deserialisation of the pane. So is fixed, now.
Also, the Docking control is not on the Silverlight Controls slide on the following page on your web-site:
0
Hi Nathan J Pledger,
Thanks for your note. We will add the respective support page for RadDocking.
All the best,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thanks for your note. We will add the respective support page for RadDocking.
All the best,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.