Force header to stay expanded

8 posts, 1 answers
  1. Roger
    Roger avatar
    32 posts
    Member since:
    Feb 2009

    Posted 20 Jan 2010 Link to this post

    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?
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 20 Jan 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Roger
    Roger avatar
    32 posts
    Member since:
    Feb 2009

    Posted 20 Jan 2010 Link to this post

    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.
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 21 Jan 2010 Link to this post

    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:

    <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>

    Let me know if I can help with something else.

    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.
  6. Roger
    Roger avatar
    32 posts
    Member since:
    Feb 2009

    Posted 22 Jan 2010 Link to this post

    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?
  7. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 25 Jan 2010 Link to this post

    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.
  8. Roger
    Roger avatar
    32 posts
    Member since:
    Feb 2009

    Posted 25 Jan 2010 Link to this post

    Thanks, Tihomir. I downloaded the trial of Blend and was easily able to extract the template and make my changes.
  9. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 25 Jan 2010 Link to this post

    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready