RadRibbonGallery without selection

5 posts, 1 answers
  1. Yoann
    Yoann avatar
    5 posts
    Member since:
    Jun 2015

    Posted 14 Mar Link to this post

    I was planning to use the RadRibbonGallery to lighten my already filled ribbon. I wanted to put my RadDropDownButtons inside of the Gallery, thus only showing by default only a few of them (the most important/common) and allowing the user to expand/scroll the Gallery to show the rest. 

    But in this scenario, having selection for items in the gallery makes no sense. Is there an easy way to 'deactivate' this functionality for the RadRibbonGallery?

  2. Milena
    Admin
    Milena avatar
    201 posts

    Posted 16 Mar Link to this post

    Hi Yoann,

    I'm not quite sure if I understand right your scenario. Could you please elaborate a bit more and provide us more detailed information and maybe images of the look/behavior you need to achieve, e.g. what do you mean by "I was planning to use the RadRibbonGallery to lighten my already filled ribbon"? 

    I'm looking forward to your reply.

    Regards,
    Milena
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yoann
    Yoann avatar
    5 posts
    Member since:
    Jun 2015

    Posted 17 Mar in reply to Milena Link to this post

    Hi Milena, 

    To simplify things, let's just say that I would like to use the RadRibbonGallery object, but I don't need the blue 'object selected' around each object (since each item in the Gallery will have an 'onClick' command on them), so the selection functionality are superfluous. 

     

     

  5. Answer
    Milena
    Admin
    Milena avatar
    201 posts

    Posted 21 Mar Link to this post

    Hi Yoann,

    There is no easy way to disable selection in RibbonGallery. To achieve this you should use a custom gallery with custom items.
    However, if you need only to hide " the blue 'object selected' around each object", you can simply set BorderThickness property of the GalleryItem to 0.
    If you are using Xaml binaries:
    <Style TargetType="telerik:RadGalleryItem">
    <Setter Property="BorderThickness" Value="0"/>
    </Style>

    If you are using NoXaml binaries: 
    <Style TargetType="telerik:RadGalleryItem" BasedOn="{StaticResource RadGalleryItemStyle}">
    <Setter Property="BorderThickness" Value="0"/>
    </Style>

    * When using implicit styles you need to set the style's BasedOn property whenever you are redefining a style. This is because otherwise it would be a brand new style, removing all previous Setters like the Template, Fill, DefaultVisualStyl, etc.

    Please have in mind that this style will not stop the selection functionality.

    I hope this information helps.

    Regards,
    Milena
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Yoann
    Yoann avatar
    5 posts
    Member since:
    Jun 2015

    Posted 22 Mar in reply to Milena Link to this post

    Thank you, this answers my need perfectly. 
Back to Top
UI for WPF is Visual Studio 2017 Ready