Using the PopupButton from within a WPFToolkit DataGrid immediately closes the popup

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 10 years ago by Matt Swanton
Version: 13.1.0581
Platform: .NET 4.5
Environment: Windows 8 (64-bit)


I am using the PopupButton from within a DataGrid column.  When the popup is opened, it immediately closes again.  Interestingly, this only happens if you click the PopupButton using the left mouse button - using the right mouse button works fine.

Does anyone have any ideas?

<Controls:DataGrid x:Name="TestDataGrid"
        <Controls:DataGridTemplateColumn Header="Test Column">
                    <Shared:PopupButton Content="Test" >
                                <MenuItem Header="Option 1" />
                                <MenuItem Header="Option 2" />

Comments (2)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Matt,

It looks like something outside our code (in WPF's core Windows message handling) is telling the popup to close in your scenario.  I did note that you can work around this problem by setting PopupButton.IsPreviewMouseDownHandled = true though.

Actipro Software Support

Posted 10 years ago by Matt Swanton


Thanks for the reply.  I have tested the work around and it solves the problem.

Many thanks.

The latest build of this product (v22.1.4) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.