Border over RadRibbonWindow

3 posts, 1 answers
  1. Maurício
    Maurício avatar
    41 posts
    Member since:
    Jan 2011

    Posted 26 Aug 2014 Link to this post

    Hello

    I need to draw a border over the RadRibbonWindow, excluding the TitleBar.

    I've attached an image where on the left you can see what I'm actually doing and on the right what I want to achieve.

    How can I achieve that?

    Code:

    <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>

            <telerik:RadRibbonView ApplicationName="DocumentSelector">
                <telerik:RadRibbonTab Header="Documents" />
            </telerik:RadRibbonView>

            <Border Grid.Row="0"
                    Grid.RowSpan="2">
                <Border.Background>
                    <SolidColorBrush Opacity="0.5" Color="Red" />
                </Border.Background>
            </Border>
        </Grid>


  2. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 29 Aug 2014 Link to this post

    Hello Maurício,

    This behavior is caused by the fact that when you have RadRibbonView paced in RadRibbonWindow, the content of the window including the ribbonview is pushed up a little so that the window can use its title bar. This is why the Border overlaps the title bar.

    In order to achieve your requirement you can set a Margin on your Border element.
    <Border Grid.Row="0"
            Margin="0 22 0 0"               
            Grid.RowSpan="2">
        <Border.Background>
            <SolidColorBrush Opacity="0.5" Color="Red" />
        </Border.Background>
    </Border>

    I hope this helps.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Maurício
    Maurício avatar
    41 posts
    Member since:
    Jan 2011

    Posted 29 Aug 2014 in reply to Martin Link to this post

    Hello Martin

    It worked as expected by using "0 19 0 0", thank you for your answer!
Back to Top