style the header so it does not appear greyed or faded

8 posts, 0 answers
  1. C
    C avatar
    7 posts
    Member since:
    Nov 2011

    Posted 09 Aug 2012 Link to this post

    Is there a way to style the header so it does not appear greyed/faded out ?
  2. Todor
    Admin
    Todor avatar
    168 posts

    Posted 09 Aug 2012 Link to this post

    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.

  3. DevCraft banner
  4. ric
    ric avatar
    22 posts
    Member since:
    Apr 2011

    Posted 31 Jul 2013 Link to this post

    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?
  5. Todor
    Admin
    Todor avatar
    168 posts

    Posted 02 Aug 2013 Link to this post

    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 >>
  6. ric
    ric avatar
    22 posts
    Member since:
    Apr 2011

    Posted 02 Aug 2013 Link to this post

    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
  7. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 07 Aug 2013 Link to this post

    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 >>
  8. ric
    ric avatar
    22 posts
    Member since:
    Apr 2011

    Posted 07 Aug 2013 Link to this post

    Thanks, yes your solution sorted it for me, turns out it was something else unrelated I was trying that prevented the click!
  9. ric
    ric avatar
    22 posts
    Member since:
    Apr 2011

    Posted 07 Aug 2013 Link to this post

    Thanks, yes your solution sorted it for me, turns out it was something else unrelated I was trying that prevented the click!
Back to Top
DevCraft banner