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

Totally remove shadow on book control

2 Answers 248 Views
Book
This is a migrated thread and some comments may be shown as answers.
first100
Top achievements
Rank 1
first100 asked on 30 Sep 2013, 10:14 PM
Hy,

I would to totally remove shadow on the book in the middle of the page,
I've read that it is not easy to edit this shadow but I would like to know if i can totally eliminate.

Many thanks

2 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 03 Oct 2013, 10:48 AM
Hello,

With the current implementation of the RadBook control you are not allowed to remove the shadows. By "remove" I mean to completely delete them. This is because the Border elements, representing the shadows, are configured through code. This is why those borders must be defined in the template of the RadBookItems.

However, you can hide those Borders - instead deleting them. You can set their Background property to Transparent. By doing so they still be there, but users will not see them.

For your convenience I extracted and edited the default template of the RadBookItem control.

<Style TargetType="telerik:RadBookItem">
    <Setter Property="Background" Value="White" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:RadBookItem">
                <Grid x:Name="LayoutRoot">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.15*" />
                        <ColumnDefinition Width="0.7*" />
                        <ColumnDefinition Width="0.15*" />
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}" Grid.ColumnSpan="3" />
                    <ContentPresenter Grid.ColumnSpan="3"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Content="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Margin="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    <Border x:Name="RightBackPageShadow"
                            Background="Transparent" Grid.Column="2"
                            IsHitTestVisible="False" Visibility="Collapsed" />
                    <Border x:Name="RightBackPageShadowStatic"
                            Background="Transparent" Grid.Column="2"
                            IsHitTestVisible="False" Visibility="Collapsed" />
                    <Border x:Name="LeftBackPageShadow"
                            Background="Transparent" Grid.Column="0"
                            IsHitTestVisible="False" Visibility="Collapsed" />
                    <Border x:Name="RightUnderPageShadow"
                            Background="Transparent" Grid.Column="0"
                            IsHitTestVisible="False" Visibility="Collapsed" />
                    <Border x:Name="LeftUnderPageShadow"
                            Background="Transparent" Grid.Column="2"
                            IsHitTestVisible="False" Visibility="Collapsed" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
Please try importing this Style into your application and let us know if it works in your particular scenario.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
0
first100
Top achievements
Rank 1
answered on 03 Oct 2013, 05:28 PM
I have resolved :D Thanks!
Tags
Book
Asked by
first100
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
first100
Top achievements
Rank 1
Share this question
or