How can I have right angles for RadRibbonWindow corners?
I attatched a sample image, I want to style it as can be seen in the Visual Studio 2012 image, where the window has four right angles and a shadow effect in the outer border.
I tried setting some borders' CornerRadius properties to 0, but nothing worked.
And how can I achieve the shadow effect in the outer border?
I'm using a custom style based on the sample project from the below thread (titled 'RadRibbonWindow theming').
http://www.telerik.com/community/forums/wpf/ribbonview/radribbonwindow-theming.aspx#2601479
I attatched a sample image, I want to style it as can be seen in the Visual Studio 2012 image, where the window has four right angles and a shadow effect in the outer border.
I tried setting some borders' CornerRadius properties to 0, but nothing worked.
And how can I achieve the shadow effect in the outer border?
I'm using a custom style based on the sample project from the below thread (titled 'RadRibbonWindow theming').
http://www.telerik.com/community/forums/wpf/ribbonview/radribbonwindow-theming.aspx#2601479
4 Answers, 1 is accepted
0
Accepted
Hello Dodd,
The corners radius and many other default settings of the RadRibbonWindow chrome depend on the WindowsChrome. The WindowsChrome calculate these values accordingly to the current Windows theme, aero effect and other system factors. And that is why there is no property for setting the CornerRadius of the Window. However by customizing the RadRibbonWindow style and properties, you can achieve the effect show on your screenshot.
Please follow these steps:
- first we need to set the RadRibbonWindow AllowsTransparency="True" and WindowsStyle="None". This will make the window transparent in order to allow the implementation of the glow/shadow effect.
- next we need to add a border to which we apply the desired glow/shadow color. We add the border at the beginning of the RadRibbonWindow ControlTemplate, like this :
- add a margin to the newly added border - this way we will push the Content away from the transparent rounded corners and the window will look with right angles.
- we also need to remove the CornerRadius from <Border x:Name="outerBorder".
I modified the project used in the forum you mentioned and attached it for your convenience. I hope this information helps. Please let us know if it works for you.
Kind regards,
Kiril Vandov
the Telerik team
The corners radius and many other default settings of the RadRibbonWindow chrome depend on the WindowsChrome. The WindowsChrome calculate these values accordingly to the current Windows theme, aero effect and other system factors. And that is why there is no property for setting the CornerRadius of the Window. However by customizing the RadRibbonWindow style and properties, you can achieve the effect show on your screenshot.
Please follow these steps:
- first we need to set the RadRibbonWindow AllowsTransparency="True" and WindowsStyle="None". This will make the window transparent in order to allow the implementation of the glow/shadow effect.
- next we need to add a border to which we apply the desired glow/shadow color. We add the border at the beginning of the RadRibbonWindow ControlTemplate, like this :
<
ControlTemplate
TargetType
=
"ribbon:RadRibbonWindow"
>
<
Grid
Background
=
"Transparent"
>
<
Border
Margin
=
"3"
BorderBrush
=
"#7FF9BEFF"
BorderThickness
=
"2"
>
<
Grid
>
...
- we also need to remove the CornerRadius from <Border x:Name="outerBorder".
I modified the project used in the forum you mentioned and attached it for your convenience. I hope this information helps. Please let us know if it works for you.
Kind regards,
Kiril Vandov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Dodd
Top achievements
Rank 1
answered on 27 May 2013, 02:41 AM
Thanks!
0
Dodd
Top achievements
Rank 1
answered on 28 May 2013, 06:15 AM
I've noticed that my main document panes do not work properly when setting RadRibbonWindow AllowsTransparency="True".
They display some dynamically loaded 3D modeling views.
I've been setting their AllowsTransparency property to "False" in code-behind before, as they worked right that way.
Is there any way I can work this propblem?
They display some dynamically loaded 3D modeling views.
I've been setting their AllowsTransparency property to "False" in code-behind before, as they worked right that way.
Is there any way I can work this propblem?
0
Accepted
Hello Dodd,
Unfortunately we are not aware of any other approach in which you could modify the RadRibbonWindow as you requested without the usage of the AllowTransparency.
Please excuse us for any inconvenience caused.
Kind regards,
Kiril Vandov
Telerik
Unfortunately we are not aware of any other approach in which you could modify the RadRibbonWindow as you requested without the usage of the AllowTransparency.
Please excuse us for any inconvenience caused.
Kind regards,
Kiril Vandov
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.