Adjust gradient shadows

2 posts, 0 answers
  1. Jamie
    Jamie avatar
    1 posts
    Member since:
    May 2012

    Posted 06 Sep 2013 Link to this post

    Hi, I need to adjust the colour and opacity of the page roll and spine shadows (not the drop shadows) of a RadBook control.

    I have been looking at the sample mentioned here but it seems like the radbook control has default shadows that I want to adjust - I dont want to add new ones.

    Can I adjust the colour and width of the gradient shadows on the control? If not, and I have to do them myself as per the sample - how do I turn the default ones off?

    Please note that I am using DataTemplates for my left and right pages, and my radbook in a Window not a UserControl.

    Thanks in advance.


    <Window x:Class="RadControlsWpfApp1.MainWindow"
                    Title="MainWindow" Height="540" Width="960" WindowState="Maximized" WindowStyle="None" WindowStartupLocation="CenterScreen" KeyUp="Window_KeyUp" MouseUp="Window_MouseUp" MouseDown="Window_MouseDown" MouseMove="Window_MouseMove" SizeChanged="Window_SizeChanged" ResizeMode="CanResize" Margin="0" SizeToContent="Manual">
            <ImageBrush x:Name="bgImage" ImageSource="/RadControlsWpfApp1;component/Images/book.jpg" Stretch="Fill" Viewbox="-0.0375,-0.0375,1.075,1.075" Viewport="0,0,1,1" ViewportUnits="RelativeToBoundingBox" />
            <DataTemplate x:Key="PageTemplate_l">
                <Border BorderThickness="1" Background="#FFF8F5EC" BorderBrush="#FFF8F5EC">
                            <RowDefinition />
                            <RowDefinition Height="Auto" />

                        <Image Source="{Binding PhotoSource}" HorizontalAlignment="Center"
                                VerticalAlignment="Center" />
            <DataTemplate x:Key="PageTemplate_r">
                <Border BorderThickness="1" Background="#FFF8F5EC" BorderBrush="#FFF8F5EC">
                            <RowDefinition />
                            <RowDefinition Height="Auto" />

                        <Image Source="{Binding PhotoSource}" HorizontalAlignment="Center"
                                VerticalAlignment="Center" />
            <Grid x:Name="LayoutRoot" Margin="0,0,0,0">
                <telerikNavigation:RadBook x:Name="book1" LeftPageTemplate="{StaticResource PageTemplate_l}"
                    RightPageTemplate="{StaticResource PageTemplate_r}" Margin="140,60,140,60" PageChanged="book1_PageChanged" ShowPageFold="Never"  FoldHintPosition="Top" PageFlipMode="None" PreviewPageFlipStarted="book1_PreviewPageFlipStarted" PageFlipStarted="book1_PageFlipStarted" PageFlipEnded="book1_PageFlipEnded">
                        <DropShadowEffect BlurRadius="3" ShadowDepth="10" Color="Gray" />
                        <Style TargetType="telerik:RadBookItem">
                            <Setter Property="Background" Value="Transparent" />
                            <Setter Property="Opacity" Value="1.0" />
                <Image Height="450" HorizontalAlignment="Center" Margin="0,0,0,0" Name="image1" Stretch="UniformToFill" VerticalAlignment="Center" Width="400"/>
                <Canvas x:Name="btnCanvas"></Canvas>

  2. Dimitrina
    Dimitrina avatar
    442 posts

    Posted 11 Sep 2013 Link to this post


    In order to adjust the color and opacity of the page roll and spine shadows of a RadBook control you have to edit the default template of the RadBookItem control.

    Please find attached an example showing a possible approach.

    If you have further questions please do not hesitate to ask.
    I hope this will help you.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
Back to Top