PopupGallery initial selected item and color

Ribbon for WPF Forum

Posted 14 years ago by Arthur Damen
Version: 9.2.0510
Platform: .NET 3.5
Environment: Windows Vista (32-bit)
I used a part of the example code to show the problem.
When the ribbon is loaded nothing is selected in the popupgallery.

However in my situation i need the first item to be selected at start!
So I add:

  Public Sub New()

    ' This call is required by the Windows Form Designer.

    ' Add any initialization after the InitializeComponent() call.

    Test.SelectedItem = Test.Items(0)
  End Sub
that will select the item 0. But when I now click on the splitbutton to show the popupgallery it looks like nothing is selected??? At the back the item is selected but the background color does not change to blue.

Looks like a bug to me.

<ribbon:RibbonWindow x:Class="Window1"
    ApplicationName="Gallery with Item Categories/Filtering/Zooming Sample" 
    Width="780" Height="560"


        <!-- Ribbon Control -->
        <ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top" >
                Use pre-defined WordApplicationMenu type in the sample project so that we don't have redundant code 
                in this sample that takes away from the focus of the sample
                <ribbon:Tab Label="Home">
                    <ribbon:Group Label="Sample">
                        <ribbon:StackPanel ItemVariantBehavior="AlwaysMedium" RowAlignment="Center">
                            <ribbon:SplitButton Label="Bullets" KeyTipAccessText="U" PopupResizeMode="Both">
                                    <ribbon:PopupGallery Name="Test" InitialColumnCount="6"  >
                                            <x:Array Type="{x:Type Image}">
                                                <Image ribbon:PopupGallery.Category="Recently1 Used Bullets"  />
                                                <Image ribbon:PopupGallery.Category="Bullet Library"  />
                                                <Image ribbon:PopupGallery.Category="Bullet Library"  />
                                                <Border Margin="2" BorderBrush="#808080" BorderThickness="1" Background="#FFFFFF" Width="40" Height="40" SnapsToDevicePixels="True">
                                                    <Image Source="{Binding Path=Source}" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True" />
                                                <Border Margin="2" BorderBrush="#808080" BorderThickness="1" Background="#FFFFFF" Width="70" Height="70" SnapsToDevicePixels="True">
                                                    <Image Source="{Binding BindsDirectlyToSource=True}" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True">
                                                            <ScaleTransform ScaleX="2" ScaleY="2" />
                                    <ribbon:Separator />
                                        <ribbon:PopupButton  Label="Change List Level" />
                                        <ribbon:Button Label="Define New Multilevel List..." />
                                        <ribbon:Button Label="Define New List Style..." />


Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Arthur,

Thanks for the bug report and we've corrected this for the next maintenance release (due out any day now).

Actipro Software Support

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