This is a migrated thread and some comments may be shown as answers.

Shadow arount RadWindow

1 Answer 170 Views
Window
This is a migrated thread and some comments may be shown as answers.
THOMAS
Top achievements
Rank 1
THOMAS asked on 02 Jan 2012, 04:45 PM

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"

..

<telerik:RadWindow.Effect>

             <DropShadowEffect ShadowDepth="10"/>

       </telerik:RadWindow.Effect>

Best regards

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 03 Jan 2012, 12:44 PM
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"/>
                            </Border>
                        </Border>
                    </Border>
                </Border>

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

I hope this helps.

Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Window
Asked by
THOMAS
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or