Border missing from Expander

6 posts, 0 answers
  1. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 24 Mar 2011 Link to this post

    Hi,

    The 2011 Q1 release (and the lastest hotfix) seem to have lost the border on the RadExpander.  I'm using Office Blue, but looking at the demos, none of the themes seem to have a border any more.

    How can I get it back?

    --
    Scott
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 30 Mar 2011 Link to this post

    Hi Scott Waye,

    Recently we introduces some changes in the RadExpander ControlTemplate and functionality in order to improve its performance. However, I am not sure to which Border you are referring to. Therefore I wanted to ask you to please send us a snapshot indicating how you need to style the RadExpander and which Border is missing.

    Looking forward towards your reply,
    Tina Stancheva
    the Telerik team
  3. DevCraft banner
  4. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 30 Mar 2011 Link to this post

    I can explain by saying what I am trying to do to get my borders back.  I am using the style:

                        <Style TargetType="Controls:RadExpander">
                            <Setter Property="BorderBrush" Value="#FF83A5D2"/>
                            <Setter Property="BorderThickness" Value="1"/>
                        </Style>

    Which gets me back a blue border around the control (which it used to have in 2010 Q3).  However there is no property for CornerRadius so it currently looks very square.  If you add that, I will be able to get the expander looking as it did with something like:

                        <Style TargetType="Controls:RadExpander">
                            <Setter Property="BorderBrush" Value="#FF83A5D2"/>
                            <Setter Property="BorderThickness" Value="1"/>
                            <Setter Property="BorderCornerRadius" Value="3"/>
                        </Style>

    In 2010 Q3 for the Office blue theme you had in Expander.xaml:

    <CornerRadius x:Key="Expander_BorderRadius">3</CornerRadius>

    and
                <Border BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{StaticResource Expander_BorderRadius}"

    But in 2011 Q1 the border radius resource is not present.

    Hope that makes it clear.

    --
    Scott
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 05 Apr 2011 Link to this post

    Hello Scott Waye,

    You can edit the default ControlTemplate of the control to set a CornerRadius to the Border hosting the control's elements:
    <ControlTemplate x:Key="ExpanderTemplate" TargetType="telerik:RadExpander">
        <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                 ...
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
                    CornerRadius="{StaticResource Expander_BorderRadius}">
                    ...
            </Border>
        </Grid>
    </ControlTemplate>

    Please have a look at it and let us know if it works for you.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 05 Apr 2011 Link to this post

    Yes, I'm sure that will work.  It would be better if you just put it back in the theme though.  Why did you remove it?
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Apr 2011 Link to this post

    Hi Scott Waye,

    We will add the CornerRadius property back to the ControlTemplate and the theme as soon as possible. You can track the item from here.

    I updated your Telerik account accordingly.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner