WPF Ribbon October 2010 Update Details


The official blog of the Windows Presentation Foundation Team

WPF Ribbon October 2010 Update Details

Rate This
  • Comments 18

Here is the detailed list of the items that were fixed in the October 2010 update.

  • Ribbon Split Button is only half-highlighted when users mouse over the button
  • Ribbon Title is bottom-aligned, should be centered
  • Ribbon Quick Access Toolbar icons are clipped and top-aligned
  • Ribbon Contextual Tab header text is getting truncated if too long
  • Ribbon Gallery Item does not stretch to fit its Parent Panel
  • Initial enabled state of Ribbon Split Menu Items can be incorrect if they have children
  • Ribbon Split Menu Item with sub-items is disabled if CanExecute=false
  • WPF Ribbon Dropdown does not close when CanAddToQuickAccessToolBarDirectly="False" was set at various level within the Ribbon
  • InvalidOperationException may occur when switching themes and the WPF Ribbon is Minimized
  • Ribbon Tab Header content may not appear when Ribbon starts out collapsed
  • RibbonTab.TabHeaderLeft & RibbonTab.TabHeaderRight are incorrect when Ribbon starts out hosted in a Collapsed control
  • Ribbon Tool Tip: Title and Footer Title gets clipped if the stringis too long
  • Vertical and horizontal alignments for the standard Ribbon controls should be centered, they were not.
  • After removing all items from the Quick Access Toolbar, phantom items remain visible
  • Right clicking on the System icon will not place the Context Menu properly
  • System Icon, Title and Quick Access Toolbar are not displayed correctly when Ribbon Windows is maximized
  • A minimized Ribbon will render on top of the window when a Popup is opened.
  • RibbonWindow.Icon does not pick appropriate small size icon from *.ico  Icon file.
  • IndexOutofRange Exception would pop when removing a Tab from an Observable Collection.
  • WPF Ribbon can use ClearType when targeting .NET Framework 4.0 control.
  • WPF Ribbon Control Design-Time experience will work with Visual Studio 2010 Express versions.

If you have any questions or you just want to send us some feedback on the changes we’ve made, let us know.

Thanks!
WPF Ribbon Team

  • Good stuff.  Keep the features coming!  Any plans on releasing a Dock Manager control?  Thanks again.

  • @shaggygi-

    Sorry, the WPF team doesn't have plans for a Dock Manager control (currently) anywhere on the horizon. That said, please make sure you are voting for your favorite WPF enhancements on Uservoice.

    Please take a look at the comments on this post about VS' dock manager for pointers to 3rd party solutions: blogs.msdn.com/.../wpf-in-visual-studio-part-5-window-management.aspx

    Thanks, Rob Relyea, WPF Team

  • I've got a problem with the RibbonTextBox, when I'll set IsEnabled to false of a RibbonTab (which contains a RibbonGroup and a RibbonTextBox), and then when IsEnabled is set to true, the RibbonTextBox is still disabled.

    Any ideas what the problem could be?

  • Hans, looks like you've identified a bug in RibbonTextBox - thanks for bringing this to our attention.  The bug occurs when no Command is set on RibbonTextBox and you toggle IsEnabled from false to true.  I've filed a work item to fix this, so we'll have it fixed in the next release.  Luckily, it's easy to work around.  For example, you can extend RibbonTextBox and override IsEnabledCore to always return true when the Command is null:

      public class MyRibbonTextBox : RibbonTextBox

      {

          protected override bool IsEnabledCore

          {

              get

              {

                  // If there is a Command specified but that Command cannot execute,

                  // then return false.

                  if (this.Command != null &&

                      !this.Command.CanExecute(this.CommandParameter))

                  {

                      return false;

                  }

                  return true;

              }

          }

      }

    There are other ways to work around this as well.  If you don't want to subclass RibbonTextBox, you can hook up some dummy command to RibbonTextBox, since this bug only repros when RibbonTextBox.Command is null.  Or, you could hook a Command and then unhook the Command as this is sufficient to initialize the RibbonTextBox's internal CanExecute flag to true.

               // Do the following in your app's constructor.

               myRibbonTextBox.Command = ApplicationCommands.Close;

               myRibbonTextBox.Command = null;

    Hope this helps.

  • Unless I'm missing something, it doesn't appear to be possible to theme the WPF Ribbon using the Office2007 themes because these resources have not been embedded in the RibbonControlsLibrary.  I get a xaml exception when specifying the following resourcedictionary:

    <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml" />

    Was this intentional or an oversight?

    Thanks! :-)

  • @Mark - The WPF Ribbon is modeled after the Win7 Ribbon and does not ship the separate Office skins (blue, silver, black).  In general, WPF only knows about OS theme skins.  If you open RibbonControlsLibrary.dll in .NET reflector and drill into Resources --> RibbonControlsLibrary.g.resources, you see that RibbonControlsLibrary.dll only contains Aero.NormalColor.baml & Generic.baml.  The Aero dictionary only contains theming for RibbonWindow so that it can match the native window appearance on Aero theme.  The Generic dictionary contains a classic look for RibbonWindow along with styles and templates for all the othe Ribbon controls to match the Win7 ribbon look.

    Since we are a framework, we made it very easy to give your ribbon a custom color scheme (I smell another blog post coming on this).  We added several convenience APIs to the Ribbon class that all the Ribbon controls respect so that you only have to specify Brushes at the Ribbon level and all the Ribbon subcontrols will pick these up.  For example:

           <ribbon:Ribbon x:Name="Ribbon"

                          Background="Khaki"

                          BorderBrush="Brown"

                          MouseOverBackground="LightCoral"

                          MouseOverBorderBrush="Coral"

                          PressedBackground="LightGreen"

                          PressedBorderBrush="Green"

                          CheckedBackground="LightBlue"

                          CheckedBorderBrush="Blue"

                          FocusedBackground="LightSlateGray"

                          FocusedBorderBrush="SlateBlue">

    Properties here like MouseOverBackground are respected in the templates of various controls like RibbonButton, allowing you to skin your Ribbon easily in a centralized location.  You should be able to leverage these APIs to achieve the Office looks etc.

  • Although everything seems to work fine I get data errors on a regular basis:

    System.Windows.Data Error: 40 : BindingExpression path error: 'IsChecked' property not found on 'object' ''RibbonMenuButton' (Name='')'. BindingExpression:Path=IsChecked; DataItem='RibbonMenuButton' (Name=''); target element is 'RibbonToggleButton' (Name='PART_ToggleButton'); target property is 'NoTarget' (type 'Object')

  • Any update on support for an InRibbonGallery type Gallery?

  • @mschoneman - We are looking at InRibbonGallery and many other items for the future iterations of the WPF Ribbon. At this point, we can't really say what is and what is not.

  • @Bartman Thanks for pointing this out.  I was able to see these binding validation errors in the Output window when running the RibbonWindowSample.  We'll look into this and try to clean up binding validation output.  If you do notice functional defects in the controls, please do submit bugs to us using Connect: connect.microsoft.com/.../CreateFeedback.aspx.

  • Hi Patrick,  Just following up on your comments regarding the removed theming.  I understand that we can modify the ribbon styles, but from what I can see this doesn't affect the window chrome.  My users are on WinXP, and the RibbonWindow looks like something from Win 3.1 days.  Any suggestions for improving this??

  • Hi,

    Toolbox controls in the ribbon, as in the picture repeats itself.

    Thank you.

    img842.imageshack.us/.../ribbonrepeattoolbox.jpg

  • @Marcus - RibbonWindow needs to be retemplated to get the Office 2010 look you are going for.  Check out our RibbonWindow template for Aero Basic.  With some modifications, you can get a black(/blue/silver) chrome and matching caption buttons and title text.

  • @Umit - I replied to your other post about this Toolbox issue on Pete Brown's blog (10rem.net/.../announcing-microsoft-ribbon-for-wpf-rtw).  VS does some caching of Toolbox data, so resetting the Toolbox may clean this up.

  • Updated on the 3.5 FW hoping for a fix with regards to a data bound RibbonComboBox and RibbonGallery

    <r:RibbonComboBox Grid.Column="1" VerticalAlignment="Top">

                   <r:RibbonGallery SelectedValue="{Binding ActiveDomain}" MaxColumnCount="3">

                       <r:RibbonGalleryCategory ItemsSource="{Binding Domains}" DisplayMemberPath="Name"/>

                   </r:RibbonGallery>

               </r:RibbonComboBox>

    When ActiveDomain is set to null, the value remains in the view as the ToString() of the object. If I open the drop down and close again it is reset appropriately and becomes empty as it should.

    Any workaround?

Page 1 of 2 (18 items) 12