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

Border over RadRibbonWindow

2 Answers 183 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Maurício
Top achievements
Rank 1
Maurício asked on 26 Aug 2014, 07:19 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 29 Aug 2014, 07:41 AM
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.
 
0
Maurício
Top achievements
Rank 1
answered on 29 Aug 2014, 11:19 AM
Hello Martin

It worked as expected by using "0 19 0 0", thank you for your answer!
Tags
RibbonView and RibbonWindow
Asked by
Maurício
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Maurício
Top achievements
Rank 1
Share this question
or