Shadow arount RadWindow

2 posts, 0 answers
    THOMAS avatar
    12 posts
    Member since:
    Jan 2011

    Posted 02 Jan 2012 Link to this post

    Dear sir,

    how can I set a shadow around RadWindow? I use the RadWindow like a user control and start it with the Show() function.

    This code shows the shadow only in designer mode but not at run time.

    <telerik:RadWindow x:Class="SilverlightControlStyles.MyWindow"



                 <DropShadowEffect ShadowDepth="10"/>


    Best regards

  2. Dani
    Dani avatar
    848 posts

    Posted 03 Jan 2012 Link to this post

    Hello Thomas,

    To add a shadow, you will need to edit the Style and ControlTemplate of RadWindow. You can generate these from Expression Blend. Just remember that generated XAML will be OfficeBlackTheme specific.

    If you have a look through the generated style, you will notice that the default shadow of RadWindow is not an Effect, but it comprised of a few Borders and is part of the ControlTemplate. This is done for the purpose of better performance.

    <Border x:Name="Shadow" BorderBrush="#11000000" BorderThickness="1" CornerRadius="10">
                        <Border BorderBrush="#22000000" BorderThickness="1" CornerRadius="9">
                            <Border BorderBrush="#33000000" BorderThickness="1" CornerRadius="8">
                                <Border BorderBrush="#44000000" BorderThickness="0 0 1 1" CornerRadius="7">
                                    <Border BorderBrush="#55000000" BorderThickness="0 0 1 1" CornerRadius="6"/>

    You can edit, replace, remove or add borders to modify the shadow of RadWindow.

    I hope this helps.

    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top