This project is read-only.

RibbonGroupBox.ItemsSource and window maximized state issues

Apr 6, 2010 at 6:09 AM


Fluent Ribbon is a great control and I'm using it with pleasure.

Anyway, I would like you to notice a few things that seem not working:

  • If I use the RibbonGroupBox.ItemsSource to generate the buttons in a typical MVVM application, anything appears
  • The WindowState Maximized doesn't really work, it just gets the dimensions of the screen but it is not in a maximized state

Thank you and good work


Apr 6, 2010 at 6:45 AM

Thank you, Francesco.

I have just tried the code below, and it works properly.

var src = new Button[]
                  new Button(){Text="ll1",Size=RibbonControlSize.Middle}, 
                  new Button(){Text="l21",Size=RibbonControlSize.Middle}, 
                  new Button(){Text="l31",Size=RibbonControlSize.Middle}, 
                  new Button(){Text="l41"}, 
                  new Button(){Text="l51"}, 
ribbonGroupBox.ItemsSource = src;

WindowState Maximized will be fixed in v1.1


Apr 6, 2010 at 9:55 AM
Edited Apr 6, 2010 at 10:05 AM

Hi Serg,


thank you for your answer. I'm trying to do it in a MVVM way, so I don't a source which contains buttons but "CommandViewModel"; the code is similar to this:


<fluent:RibbonTabItem DataContext="{Binding Path=Toolbox}" Group="{Binding ElementName=ribbonDiagramGroup}" Header="{Binding Path=Header}">
                <fluent:RibbonGroupBox Header="New item">
                    <fluent:InRibbonGallery ItemsSource="{Binding Path=Items}">
                                <fluent:Button Text="{Binding Mode=OneWay, Path=Header}">
                                        <i:EventTrigger EventName="PreviewMouseLeftButtonDown">
                                            <cmd:EventToCommand Command="{Binding Path=PreviewMouseLeftButtonDownCommand}" PassEventArgsToCommand="True"/>
                                        <i:EventTrigger EventName="MouseMove">
                                            <cmd:EventToCommand Command="{Binding Path=MouseMoveCommand}" PassEventArgsToCommand="True"/>


The code above doesn't work. Toolbox is a custom ToolboxViewModel class and Items is of type ObservableCollection<ToolboxItemViewModel>.

I hope this helps you reproducing the problem, otherwise I will provide you more details.


Update: this example works if I change the binding path of the InRibbonGallery from Items to Toolbox.Items, but I can't understand why the DataContext is not inherited from the RibbonTabItem.


Thank you,


Apr 15, 2010 at 7:28 AM

I realized that the problem raises up when the datacontext is changed during the lifetime of the application.

I will try to give you a simplified example reproducing the issue.