question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weird Behaviors with RibbonToolBar and LayoutDefinitions

See original GitHub issue

I’m new to WPF and Fluent so, I’m sorry in advance if there is something that I missed. With the following codes below, I’m trying to smoothly resize a RibbonGroupBox into the ‘Collapsed’ state. Here, I encountered a weird behavior using SizeDefinition. As I reduce the main window horizontally from the initial state, ‘Cut’ button gets resized to a large icon, then both buttons disappear, then they get collapsed. When I enlarge the window or click the collapsed RibbonGroupBox, ‘Cut’ button remains to be a large icon. Image

<Fluent:RibbonTabItem Header="Tab" ReduceOrder="Clipboard, Clipboard, Clipboard">
    <Fluent:RibbonGroupBox Header="Group" Name="Group">
        <Fluent:RibbonToolBar>
            <Fluent:Button Header="Paste" Name="Paste" SizeDefinition="Large"
            Icon="pack://application:,,,/Paint;component/Images/2-1.png"
            LargeIcon="pack://application:,,,/Paint;component/Images/2-1.png">

            <Fluent:Button Header="Cut" Name="Cut" SizeDefinition="Medium"
            Icon="pack://application:,,,/Paint;component/Images/2-2.png"
            LargeIcon="pack://application:,,,/Paint;component/Images/2-2.png">
        </Fluent:RibbonToolBar>
    </Fluent:RibbonGroupBox>
</Fluent:RibbonTabItem>

I tried to fix this behavior by setting LayoutDefinitions. This fixed most of the problems from the code above but, when I click the collapsed RibbonGroupBox, the pop up box doesn’t correctly display the buttons. Also, it seems like ‘Cut’ button is getting resized to a large icon again, Image

<Fluent:RibbonTabItem Header="Tab" ReduceOrder="Clipboard, Clipboard, Clipboard">
    <Fluent:RibbonGroupBox Header="Group" Name="Group">
        <Fluent:RibbonToolBar>
            <Fluent:RibbonToolBar.LayoutDefinitions>
                <Fluent:RibbonToolBarLayoutDefinition Size="Large">
                    <Fluent:RibbonToolBarRow>
                        <Fluent:RibbonToolBarControlDefinition Target="Paste" Size="Large"/>
                        <Fluent:RibbonToolBarControlDefinition Target="Cut" Size="Middle"/>
                    </Fluent:RibbonToolBarRow>
               </Fluent:RibbonToolBarLayoutDefinition>
            </Fluent:RibbonToolBar.LayoutDefinitions>

            <Fluent:Button ... />
            <Fluent:Button ... />
        </Fluent:RibbonToolBar>
    </Fluent:RibbonGroupBox>
</Fluent:RibbonTabItem>

Am I doing anything wrong here? Thanks!


Environment

  • Fluent.Ribbon v6.1.0.233
  • Windows 10
  • .NET Framework 4.5.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
batzencommented, Jun 12, 2019

Yes, that’s the right version. Good luck with your finals.

1reaction
batzencommented, May 13, 2019

Ok, it’s horribly broken when using RibbonToolBar. Didn’t notice this as i don’t use that control myself. Will have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ribbons look different in excel
Hi, I just noticed that the ribbons in my excel look different. ... I mean go to File > Option, click Quick Access...
Read more >
Strange Ribbon Behavior - Civil 3D Community
My ribbon always opens to that last, non contextual tab active in model space. A paperspace layout brings up the layout tools ribbon...
Read more >
Hide Ribbon Weird Behaviour.
i tried putting the code, on LOAD, and on OPEN. it only hides the toolbar, when i put the form into design view,...
Read more >
SSMS toolbar and ribbon buttons repeating several times
Go to tools > Customize. Click the Commands tab. Click "Reset All". Here is a screenshot.
Read more >
Merged Ribbon - Allow the layout of bar items in ...
If you save a parent RibbonControl's RibbonQuickAccessToolbar layout, all the items including merged ones will be saved.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found