Bind Bug in RibbonGallery

Ribbon for WPF Forum

Posted 15 years ago by Eli Gazit - CEO, Softwear Suit Ltd
I am trying to bind the Ribbon Gallery to a BindigList<MyObject> and to present a text and image as Items. Each time I add an item to the BindingList it is being added to the gallery but:
1. There is only one item in the first Row in the visible gallery (it is ok in the popup one).
2. The buttons up and down are disabled.

What am I doing wrong?

private BindingList<SidePrintegerListBoxItem> _items =
            new BindingList<SidePrintegerListBoxItem>();
        public BindingList<SidePrintegerListBoxItem> Items
            get { return _items; }

                            Label="Export Manager" KeyTipAccessText="X" 
                            ScreenTipDescription="Export Manager Slides Gallery." MinWidth="300">
                                        <Border BorderBrush="Black" BorderThickness="2" 
                                            <Image Source="{Binding Path=BitImage}"
                                                   Stretch="Fill" Width="50" Height="50" />
                                        <TextBlock Margin="3" 
                                            Text="{Binding Path=HeaderText}" />
                                        ItemTemplate="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ribbon:RibbonGallery}}, Path=ItemTemplate}"
                                        ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ribbon:RibbonGallery}}, Path=ItemsSource}" />
                                    <ribbon:Separator />
                                        <ribbon:Button Label="Save Selection as a New Quick Style..." KeyTipAccessText="Q" />
                                        <ribbon:Button KeyTipAccessText="C" />
                                        <ribbon:Button Label="Apply Styles..." KeyTipAccessText="A" />

Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Eli,

It's hard to tell without something to debug, but it's possible that you are reusing visuals. As you probably know, a Visual (which I'm assuming your SidePrintegerListBoxItem is) can only belong to one parent. In this case, the RibbonGallery would be one parent, and the PopupGallery would be the second. Most times you'd get an exception when this occurs, but there are times when it will simply not render the Visual in one or both locations.

If that doesn't help, please put together a small sample project and email it over to our support email then we can take a look.

Actipro Software Support

Posted 15 years ago by Eli Gazit - CEO, Softwear Suit Ltd
I created the demo project u asked me to present the bug.
I sent it to the support email address.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
This turned out to be an issue with the RibbonGallery and is fixed in WPF Studio 2009.1 build 0500.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.