Right angles for RadRibbonWindow

5 posts, 2 answers
  1. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 14 May 2013 Link to this post

    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
  2. Answer
    Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 16 May 2013 Link to this post

    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 :
    <ControlTemplate TargetType="ribbon:RadRibbonWindow">
        <Grid Background="Transparent">
               <Border Margin="3" BorderBrush="#7FF9BEFF"  BorderThickness="2" >
                   <Grid>
    ...
    - 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

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 26 May 2013 Link to this post

    Thanks!
  5. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 28 May 2013 Link to this post

    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?
  6. Answer
    Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 30 May 2013 Link to this post

    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

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready