Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InRibbonGallery: Dynamic ItemWidth / use translated Text in items #786

Closed
MenzenJ opened this issue Apr 8, 2020 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@MenzenJ
Copy link

MenzenJ commented Apr 8, 2020

I'm trying to achieve an InRibbonGallery where you can select an option and use Icon + Text for those options. I basically convert the Gallery to a list by setting MaxItemsInRow to 1.
It should look like this:
InRibbonTemplates
The text of the options is translated, so I do not know the ItemWidth.
The issue is: If the first item of the gallery is not the longest the other items get cut off:
InRibbonGallery
The same is true for the Popup. Even if I resize the popup, the items remain the same fixed size:
InRibbonGalleryFixedSize
The Xaml used for the Screenshots:

<fluent:RibbonGroupBox Header="Actual">
    <fluent:InRibbonGallery Header="Templates" MaxItemsInRow="1" MaxItemsInDropDownRow="1" ResizeMode="Both" Selectable="False">
        <TextBlock Text="Hallo"/>
        <TextBlock Text="Hallo text text"/>
        <TextBlock Text="Hallo text"/>
   </fluent:InRibbonGallery>
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Expected">
    <fluent:InRibbonGallery Header="Templates" MaxItemsInRow="1" MaxItemsInDropDownRow="1" ResizeMode="Both" Selectable="False">
        <!-- spaces as workaround -->
        <TextBlock Text="Hallo                "/>
       <TextBlock Text="Hallo text text"/>
       <TextBlock Text="Hallo text"/>
    </fluent:InRibbonGallery>
</fluent:RibbonGroupBox>

I currently use spaces in the first item to fill it up to the longest item's text, which of course is not ideal.
Do you consider this as a use case for the InRibbonGallery or should I use another control to achieve the list with DropDown i.e. a SplitButton or something else?

PS: I thought this was an issue caused by #666


Environment

  • Fluent.Ribbon v7.1.0
  • Windows 10
  • .NET Framework 4.7.1
@batzen batzen self-assigned this Apr 8, 2020
@batzen batzen added the Bug 🐞 label Apr 8, 2020
@batzen
Copy link
Member

batzen commented Apr 8, 2020

I consider this a bug in Fluent.Ribbon. Will investigate.

@batzen batzen added this to the Next milestone Apr 10, 2020
@batzen batzen closed this as completed in 06b01b3 Apr 18, 2020
@batzen batzen modified the milestones: Future, 8.0.0 Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants