ribbon:gallery loosing itemsSource

Ribbon for WPF Forum

Posted 16 years ago by Steve GW
Avatar
I have defined a RibbonGallery inside a Ribbon Tab in a group

<ribbon:RibbonGallery Name="DrawingsContainer" MinWidth="120" Margin="2" MinHeight="80" ItemsSource="{Binding Source={StaticResource drawingImages }}">

and a PopupGallery inside it

<ribbon:PopupGallery Name="DrawingsQueuePopup" InitialColumnCount="4" IsSelectionHighlightVisible="False"
ItemsSource="{Binding Source={StaticResource drawingImages }}"
/>
I have an action that adds new content to the Galleries ItemsSource. Things seem to work and the static drawingImages fires during a bebug ... so I see the new ItemsSource get updated and I refresh the Items and layouts during the add new image to Gallery

i.e.

ribbonEditor.DrawingsContainer.Items.Refresh();
ribbonEditor.DrawingsQueuePopup.Items.Refresh();
ribbonEditor.DrawingsQueuePopup.UpdateLayout();
ribbonEditor.DrawingsContainer.UpdateLayout();


If Select the Popup from the gallery the new content new there (although the images scales are all wrong) but after the Popup close all my Gallery content is gone. Switch Tabs does not bring the content back.

This is release 5.0

The question is why after the popup close the content disappears? and the scales of the images is all wrong.
Any ideas

Comments (4)

Posted 16 years ago by Steve GW
Avatar
By adding refresh on PopupClosed and PopupOpening I able to not loose contents ie...

private void DrawingsContainer_PopupClosed(object sender, RoutedEventArgs e)
{
DrawingsContainer.Items.Refresh();

}

private void DrawingsContainer_PopupOpening(object sender, ActiproSoftware.Windows.CancelRoutedEventArgs e)
{
DrawingsQueuePopup.Items.Refresh();
}


where DrawingsContainer is ribbon:RibbonGallery

Doesn't seem right but it does work for now
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Steve,

Could you please put together a small sample project that exhibits the issue(s) and send it over to our support email? Once we get that we should be able to track the issue down pretty quickly.

Thanks


Actipro Software Support

Posted 16 years ago by Steve GW
Avatar
I sent a zipped up example via a ticket 120-11B87F3F-59BE :-)
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Steve,

We replied via email, but the problem boils down to using the same Visuals in the RibbonGallery and the PopupGallery (which is not supported by WPF).


Actipro Software Support

The latest build of this product (v24.1.3) 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.