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

style the header so it does not appear greyed or faded

7 Answers 38 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
C
Top achievements
Rank 1
C asked on 09 Aug 2012, 11:24 AM
Is there a way to style the header so it does not appear greyed/faded out ?

7 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 09 Aug 2012, 03:57 PM
Hello Ciaran,

There is a way to get the effect you desire, by placing the following code-block into RadRichTextBox resources:

<telerik:RadRichTextBox.Resources>
        <!-- HeaderFooterPresenterBase -->
        <Style TargetType="telerikUI:HeaderFooterPresenterBase" x:Key="HeaderFooterPresenterBaseStyle">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikUI:HeaderFooterPresenterBase">
                        <Grid>
                            <StackPanel x:Name="WrappingStackPanel">
                                <telerik:RadRichTextBox x:Name="BodyRichTextBox"
                            AllowScaling="False"
                            BorderThickness="0"
                            Background="Transparent"
                            Margin="0"
                            Padding="0"
                            MouseOverBorderThickness="0"/>
                            </StackPanel>
  
                            <Rectangle x:Name="FadingRectangle" Fill="Transparent" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
  
        <Style TargetType="telerikUI:HeaderPresenter" BasedOn="{StaticResource HeaderFooterPresenterBaseStyle}" />
        <Style TargetType="telerikUI:FooterPresenter" BasedOn="{StaticResource HeaderFooterPresenterBaseStyle}" />
    </telerik:RadRichTextBox.Resources>

Please note, the values of the StackPanel Background property and the Rectangle's Fill property.

Hope this helps.
Greetings,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
ric
Top achievements
Rank 1
answered on 31 Jul 2013, 03:33 PM
I tried this with the latest Radtools and got a HeaderFooterBase does not exist error. Tried styling the HeaderPresenter / FooterPresenter seperately but it doesn't make a difference. In fact, no matter what I do to FadingRectangle it refuses to respect my styles, suggesting to me that code is manipulating it?
0
Todor
Telerik team
answered on 02 Aug 2013, 01:28 PM
Hello Ric,

In the latest 2013 Q2 SP1 version of the controls, in addition to the code below, you should also set the following style to the HeaderFooterContainer:

<Style TargetType="telerikUI:HeaderFooterContainer">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerikUI:HeaderFooterContainer">
                <ContentPresenter />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="OverlayBrush" Value="Transparent" />
</Style>

The telerikUI namespace from this snippet and the one above is:

xmlns:telerikUI="clr-namespace:Telerik.Windows.Documents.UI;assembly=Telerik.Windows.Documents"

This said, we have tried to reproduce the problem with the exception, but to no avail. In order to help you, can you please try to isolate the issue in a project and send it to us?

In addition, please answer to the following questions:
  • What version are the binaries which are referred in your application - normal or NoXAML
  • Which theme is applied when you are facing that issue?

Looking forward to your reply.

 

Regards,
Todor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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
ric
Top achievements
Rank 1
answered on 02 Aug 2013, 02:11 PM
it's not an exception, it's a compile error, but it appears that I got the telerikUI namespace wrong

combination of both pieces of XAML makes the fade go away, but now I can't double click to edit the header text!

version = 2013.1.403.1050
0
Iva Toteva
Telerik team
answered on 07 Aug 2013, 07:12 AM
Hi Ric,

We tried the code below with the version of controls you use, but were not able to reproduce the problem. Please find attached a test project.

In case you don't manage to solve the issue in your application, we would appreciate it if you could open a support ticket and attach a project of yours illustrating the problem.

Regards,
Iva Toteva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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
ric
Top achievements
Rank 1
answered on 07 Aug 2013, 08:14 AM
Thanks, yes your solution sorted it for me, turns out it was something else unrelated I was trying that prevented the click!
0
ric
Top achievements
Rank 1
answered on 07 Aug 2013, 08:14 AM
Thanks, yes your solution sorted it for me, turns out it was something else unrelated I was trying that prevented the click!
Tags
RichTextBox
Asked by
C
Top achievements
Rank 1
Answers by
Todor
Telerik team
ric
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or