Posted 12 years ago by Peter Idestam-Almquist

I wonder how to display a popup menu using a PopupButton.

I am trying this way:

<Controls1:PopupButton Content="Control" Width="75" Margin="5 0 0 0">
                                <Menu Width="75" IsMainMenu="False" >
                                            <VirtualizingStackPanel Orientation="Vertical" />
                                <MenuItem x:Name="startMenuItem" Header="Start" IsEnabled="{Binding Path=CanStart}" Click="startMenuItem_Click" >

However, the menu background is incorrect.

Is there any better way to do the job?

Thank you!

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Peter,

There is a QuickStart that demosrates this in the Sample Browser, under Shared Library\PopupButton. But to answer your question, you would need to use the PopupMenu property, not the PopupContent. Also, you would need to use a ContextMenu object, not a Menu object. Something like this:
<shared:PopupButton ...>
            <MenuItem .... />

Actipro Software Support

Posted 12 years ago by Peter Idestam-Almquist
Thank you! It seems I missed this QuickStart...
The latest build of this product (v2019.1 build 0686) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.