Feedback on Bars Beta

Bars for WPF Forum

Posted 1 year ago by Daniel Graham
Version: 23.1
Platform: .NET 6.0
Environment: Windows 11 (64-bit)
Avatar

This is for release 23.1.0.0

I've migrated our application from the previous ribbon implementation to the new Bars implementation to get a look and feel that is similar to Office. I had the application back up and running after about an hour and a half and then it toook another 5 or 6 hours to sort out layout issues and one or two other teething issues. I used the SamplesGallery download to rapidly subsitute code snippets etc...

By and large it was a fairly easy migration and the product seems to work well and be a pretty close facsimile of what one see's in the most recent release of Office 365.

So now, the useful stuff / niggles etc...

- It would be useful to have some equivalent of a TextBlock. Obviously I can use as actual TextBlock but then the tooltip doesn't render the same as the other BarControl tooltips (ie: it hovers over the TextBlock rather than appearing at the bottom edge of the Bars control). This is a necessity where you have custom controls - need some way of labelling them.

- BarCombBox doesn't seem to respect IsEnabled. The popup still opens even when false. There is no Label property to display a title for it either (see TextBlock above for problem with alternative).

- There is no way that I can see to right justify a RibbonControlGroup. This would be useful so that I could have a help button all the way to the right of the screen rather than have it's position vary according to the number of items in the currently selected RibbonGroup. In fairness - Office doesn't do this (they have an entire RibbonGroup devoted to "Help") so I can see why it hasn't come up. Just think it would useful.

- It isn't possible to have "Large" menu items in the Application Menu - only small ones. This was possible in the old Ribbon. I would provide a picture if this thread editor would allow me to!

- The default font used for the Tab headings is not identical to the one used by Office 365, it's slightly smaller / less tall. Or it could not be entirely observing screen scaling settings. hard to say which. Whichever - it's not identical.

That's all I can I think that I've come across so far. Lots seems to just work - so well done!

Thanks

Comments (8)

Posted 1 year ago by Daniel Graham
Avatar

Re: "Large" menu items in the Application Menu - have since found the UseLarge property which resolved that.

Further issues:

- In the RibbonApplicationButton.MenuFooter - the code sample in the help uses BarButton - however it doens't display any label text in the button despite it being defined. Just the image.

EDIT - I've found the solution to this - the BarButton has to have VariantSize="Medium" or higher.

However when the width of the MenuFooter is wider that the body of the rest of the application menu, you get a very ugly drop shadow to the right of the application menu out to the width of the footer. It would be much better if this could be made opaque.

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Daniel,

We're really glad to hear it was a relatively painless and beneficial switch to the new Bars Ribbon.  Let's dive into the questions/comments.

1) You can include any custom control in Ribbon and have a ScreenTip appear below the control. One way would be to do this (ScreenTip inherits ToolTip but has the location aware features):

<TextBlock Text="Foo">
	<TextBlock.ToolTip>
		<bars:ScreenTip Content="This is a screentip for a TextBlock." />
	</TextBlock.ToolTip>
</TextBlock>

2a) We've fixed the BarComboBox dropdown button not respecting IsEnabled for the next build.

2b) BarComboBox does have a Label property but it only shows in certain cases due to the complexities of rendering labels with controls like that in a ribbon. If you have a RibbonControlGroup that is in stacking mode (Medium variant) it will show the BarComboBox.Label. Look at the demo's View tab for an example.

3) Correct, there isn't a way to right-justify controls in the tab content area. But what you can do is put any control right-aligned in the tab header row, such as what we show with the Share button in the demo.

4) I see you found the BarMenuItem.UseLargeSize property in the followup.

5) On my system, the demo's tab font looks pretty much the same as in Word. We are already scaling the font size for the tabs up a bit from the default font size via the use of the AssetResourceKeys.MediumLargeFontSizeDoubleKey resource. If you wish to tweak that, you could override the resource value in the Ribbon.Resources, or could make an implicit Style containing a Setter for RibbonTabHeader.FontSize within. But in general, it should look correct and matched with Office out of the box without needing to do those things.

6) Yes for BarButton, a Small (default) VariantSize will only show image (falling back to label if no image). Whereas Medium will show both.

7) Thanks for reporting the wide MenuFooter issue. It appears to work if you also define MenuAdditionalContent, but without that, a large footer will have the shadow issue. We've updated the code for the next build to fix that.

I will note though that while the menu will no longer show the drop shadow in that area in this scenario, if you are using large menu items, they will possibly show up in the middle of the wide app menu. The reason there is that menu items with UseLargeSize="True" have a MaxWidth="350" applied so that descriptions wrap. If you use large menu items in the app menu and have a wide footer, you might need to set the menu items' MaxWidth larger. Or if you use small menu items (or a footer smaller than 350 wide), there are no problems.

Thanks again for all the feedback!


Actipro Software Support

Posted 11 months ago by Daniel Graham
Avatar

Thanks for coming back so rapidly.

Still struggling on 2b. My XAML looks a bit like this:

<bars:RibbonTabItem Label="Insert" KeyTipText="I" Visibility="{Binding IsReader, Converter={StaticResource BoolToVisibilityInverted}}">
<bars:RibbonGroup Label="Aggregated Values">
<bars:RibbonControlGroup ItemVariantBehavior="AlwaysMedium" Margin="10,0,0,0" Visibility="{Binding HasActiveReport, Converter={StaticResource BoolToVisibility}}">
<bars:BarComboBox Label="Rows use:" ItemsSource="{Binding ActiveReport.AvailableActiveHierarchyTypes}" SelectedItem="{Binding ActiveReport.ActiveHierarchyType}" IsEnabled="{Binding CanRunReport}" />
</bars:RibbonControlGroup>
</bars:RibbonGroup>

It still refuses to show a label.

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Daniel,

We tested your sample XAML and we see a label in Classic mode.  Control labels are currently not supported in Simplified mode, though.  Can you confirm if the label is visible for you in Classic mode? If not, maybe you could reproduce in a sample project with Classic mode and send to our support email address with a link back to this post?


Actipro Software Support

Posted 11 months ago by Daniel Graham
Avatar

This is a Classic Mode problem.

Apologies - I think I over simplified my xaml when I pasted it - as I removed three buttons to focus on the problem of the combobox - but in playing with this, actually, I think it is the presence of the three buttons that is causing the problem, as when I take them out, it starts working. Here is the slightly less simple xaml!

<bars:RibbonTabItem Label="Insert" KeyTipText="I" Visibility="{Binding IsReader, Converter={StaticResource BoolToVisibilityInverted}}">
<bars:RibbonGroup Label="Aggregated Values">
<bars:BarButton Label="Row Totals" VariantSize="Large" LargeImageSource="total-row-48.png" Command="{Binding EditRowTotalsCommand}" ToolTip="{Binding EditRowTotalsCommand.ToolTip}"/>
<bars:BarButton Label="Column Totals" VariantSize="Large" LargeImageSource="total-column-48.png" Command="{Binding EditColumnTotalsCommand}" ToolTip="{Binding EditColumnTotalsCommand.ToolTip}"/>
<bars:BarButton Label="Hierarchies" VariantSize="Large" LargeImageSource="parallel_tasks-48.png" Command="{Binding EditHierarchiesCommand}" ToolTip="{Binding EditHierarchiesCommand.ToolTip}"/>
<bars:RibbonControlGroup Margin="10,0,0,0" ItemVariantBehavior="AlwaysMedium" VerticalAlignment="Top" Visibility="{Binding HasActiveReport, Converter={StaticResource BoolToVisibility}}">
<bars:BarComboBox Margin="0,2,0,0" Label="Rows use" VerticalAlignment="Top" MinWidth="90" ItemsSource="{Binding ActiveReport.AvailableActiveHierarchyTypes}" SelectedItem="{Binding ActiveReport.ActiveHierarchyType}" themes:ThemeProperties.CornerRadius="3" />
</bars:RibbonControlGroup>

[Modified 11 months ago]

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thanks, we can reproduce it now.  

It looks like we were incorrectly adjusting the display of the external headers (label) based on the RibbonControlGroup.VariantSize property instead of by the resolved RibbonControlGroup.ItemVariantSize property.  Therefore when the RibbonGroup was telling the RibbonControlGroup to be Large variant size in this scenario, it was hiding the external header, even though you specified ItemVariantBehavior="AlwaysMedium" as an override for it to always be Medium where labels should show.  We've fixed this for the next maintenance release.

Also some quick tips after looking at the XAML:

  • Don't set the VariantSize property on any controls.  The containing RibbonGroup and any RibbonControlGroups within will do all the adjusting of variant sizes, which is what allows the Ribbon have its powerful resizing capabilities.  You can however adjust the RibbonTab's GroupVariants (for Classic layout mode) or ControlVariants (for Simplified layout mode) to determine the order in which groups resize their children.  Also using RibbonControlGroup to wrap controls that can switch to vertical stacking and setting its ItemVariantBehavior is a good thing.
  • Unless it's a special situation, don't set Margin on controls in the Ribbon.
  • For BarComboBox and BarTextBox, use the RequestedWidth property instead of MinWidth or Width.


Actipro Software Support

Posted 11 months ago by Daniel Graham
Avatar

This is great stuff - thank you so much.

Do you have a rough idea as to when the next maintenance build will hi NuGet for me to test?

Many thanks.

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

We are still collecting changes and don't have a release date set yet.  But if you don't see something come out in the next week or two, write us and we can push a preview build for you.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.