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

RibbonContextualTabGroup not shown #673

Closed
znakeeye opened this issue Nov 28, 2018 · 2 comments
Closed

RibbonContextualTabGroup not shown #673

znakeeye opened this issue Nov 28, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@znakeeye
Copy link

Place your issue description here.
Upgraded from v3.6 and now my RibbonContextualTabGroup is not shown even though I explicitly set Visibility="Visible". Its children, two RibbonTabItem elements, are indeed shown. Using Snoop, when selecting any of these two tab items, the contextual tab group suddenly appears!

In my code, the child items become visible when setting a certain flag:

<fluent:Ribbon.ContextualGroups>
  <fluent:RibbonContextualTabGroup x:Name="MyContextualGroup" Header="My Tools"
                                   Visibility="Visible"
                                   BorderBrush="Green"
                                   Background="Green"
                                   Foreground="DarkGreen"
                                   FontSize="10" />
</fluent:Ribbon.ContextualGroups>
<!-- ... -->
<fluent:RibbonTabItem Header="Foo" Group="{Binding ElementName=MyContextualGroup}"
                      Visibility="{Binding Path=IsFooBarVisible,Converter=...} />
<fluent:RibbonTabItem Header="Bar" Group="{Binding ElementName=MyContextualGroup}"
                      Visibility="{Binding Path=IsFooBarVisible,Converter=...} />

These is what I see. When IsFooBarVisible is set to true:

First I see this...

Then I select the Foo tab using Snoop. Suddenly it is refreshed...

Then I select Foo...

Then I select the Bar tab using Snoop. Not sure what happened here. The tabs switched places:

Then I select Bar... ehm?

And after some fiddling around, the tabs are finally refreshed. After this, the tabs look good even when toggling the visibility.

ribbon-tab-fixed


Environment

  • Fluent.Ribbon v7.0.0-alpha0456
  • Windows 10
  • .NET Framework 4.5.2
@znakeeye
Copy link
Author

I found a non-intuitive solution. Either I really encountered a bug, or we should make a note about the observed behavior.

Works:

<fluent:RibbonTabItem Group="{Binding Source={x:Reference MyContextualGroup},Mode=OneWay}" ... />

Not working:

<fluent:RibbonTabItem Group="{Binding Element=MyContextualGroup},Mode=OneWay}" ... />

@batzen
Copy link
Member

batzen commented Nov 28, 2018

Will have a look at this.
Had to switch from x:Reference to Element in the showcase application because .net core 3.0 doesn't currently support x:Reference

@batzen batzen self-assigned this Nov 28, 2018
@batzen batzen added this to the 7.0.0 milestone Nov 28, 2018
@batzen batzen closed this as completed Dec 3, 2018
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