What I would like to do is to force a specific RadPanelBarItem to stay expanded and, ideally, get rid of the arrow too (specifically, I want to do this for the first item and leave the rest to act normally). I have tried handling various events and setting templates to try to intercept the collapse functionality but have been so far unable to figure it out. I am also unable to figure out how to remove the arrow. Any ideas?
7 Answers, 1 is accepted
0
Hello Roger,
You can prevent an item from being collapsed by handling its PreviewCollapsed event. For removing the arrow you will have to edit the default ControlTemplate.
However, it seems that you are trying to achieve a look similar to that of the OutlookBar control. Will it work for you instead of modifying the PanelBar control?
http://demos.telerik.com/silverlight/#OutlookBar/FirstLook
Greetings,
Tihomir Petkov
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.
You can prevent an item from being collapsed by handling its PreviewCollapsed event. For removing the arrow you will have to edit the default ControlTemplate.
However, it seems that you are trying to achieve a look similar to that of the OutlookBar control. Will it work for you instead of modifying the PanelBar control?
http://demos.telerik.com/silverlight/#OutlookBar/FirstLook
Greetings,
Tihomir Petkov
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
Roger
Top achievements
Rank 1
answered on 21 Jan 2010, 02:16 AM
Hi Tihomir,
Unfortunately, the OutlookBar doesn't quite meet my needs. I would like only the top item to be static, but the rest of the items should expand and collapse as happens in a PanelBar (i.e. the top item will always be visible to the user).
I was handling the PreviewCollapsed event, and it was preventing the collapse, but its child items were still disappearing. I just found out why: the collapse action is a trigger in the template. So now I've removed that, and the top item works the way I want.
So now I have another question. I got the default template and have modified it do what I want. However, there are several resource names in the template that are not recognized (e.g. the "select" state has a BorderBrush resource named "RadPanelBar_BorderMiddleOver" and a Background resource named "RadPanelBar_TopItemBackgroundOver". If I understand their purpose correctly, I need them so that the theme is applied correctly. So what do I need to do to ensure that these resources get included?
Thanks for your help.
Unfortunately, the OutlookBar doesn't quite meet my needs. I would like only the top item to be static, but the rest of the items should expand and collapse as happens in a PanelBar (i.e. the top item will always be visible to the user).
I was handling the PreviewCollapsed event, and it was preventing the collapse, but its child items were still disappearing. I just found out why: the collapse action is a trigger in the template. So now I've removed that, and the top item works the way I want.
So now I have another question. I got the default template and have modified it do what I want. However, there are several resource names in the template that are not recognized (e.g. the "select" state has a BorderBrush resource named "RadPanelBar_BorderMiddleOver" and a Background resource named "RadPanelBar_TopItemBackgroundOver". If I understand their purpose correctly, I need them so that the theme is applied correctly. So what do I need to do to ensure that these resources get included?
Thanks for your help.
0
Hello Roger,
If you edit a control's default style in Blend, you will get all used resources extracted for you by Blend. I am pasting the default values of the two resources below:
Greetings,
Tihomir Petkov
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.
If you edit a control's default style in Blend, you will get all used resources extracted for you by Blend. I am pasting the default values of the two resources below:
<LinearGradientBrush x:Key="RadPanelBar_TopItemBackgroundOver" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="#FFFDDF97" Offset="0.992" />
<GradientStop Color="#FFF7DCAB" Offset="0.02" />
<GradientStop Color="#FFFFDC9E" Offset="0.5" />
<GradientStop Color="#FFFDBA64" Offset="0.51" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="RadPanelBar_BorderMiddleOver" EndPoint="0,1">
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="#FFe4f3f8" Offset="1" />
</LinearGradientBrush>
Greetings,
Tihomir Petkov
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
Roger
Top achievements
Rank 1
answered on 22 Jan 2010, 07:13 PM
I don't have Blend (until now, I haven't really needed it). Is there another tool you could suggest which would accomplish something similar? Or do you think that Blend offers enough functionality over Visual Studio designers that it would be worth purchasing?
0
Accepted
Hello Roger,
Blend certainly has way more design-related features in comparison to Visual Studio and is the recommended way of editing the look and feel of Silverlight applications. My advice would be that you download a free trial and give it a try.
Let me know if Blend is not an option for you.
Best wishes,
Tihomir Petkov
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.
Blend certainly has way more design-related features in comparison to Visual Studio and is the recommended way of editing the look and feel of Silverlight applications. My advice would be that you download a free trial and give it a try.
Let me know if Blend is not an option for you.
Best wishes,
Tihomir Petkov
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
Roger
Top achievements
Rank 1
answered on 25 Jan 2010, 10:40 AM
Thanks, Tihomir. I downloaded the trial of Blend and was easily able to extract the template and make my changes.
0
Hi Roger,
Do not bother to ask us if you have any other questions. Any feedback is highly appreciated.
Kind regards,
Boryana
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.
Do not bother to ask us if you have any other questions. Any feedback is highly appreciated.
Kind regards,
Boryana
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.