Posted 15 years ago
by Craig
-
Varigence, Inc.
Version: 10.1.0521
Platform: .NET 4.0
Environment: Windows 7 (32-bit)

I'm hitting a case where the PopupButton control closes unexpectedly.
The scenario is that I have a .NET 4.0 datagrid with a template column. The cell template is a textblock but the editing template contains a PopupButton. Within the PopupButton is the ResizableContentControl, which is displaying a user control. Within the UserControl is a TreeView. I'm seeing that whenever I click in the ResizableControl area, unless I click perfectly on a TreeViewItem, the popup closes immediately and then reopens. My expectation would be that the popup would remain open until I actually select an item. I know that an item isn't being selected in the treeview since its SelectedItemChanged event doesn't fire.
My suspicion is that the UserControl is getting in the way somehow since I don't have the same problem if I add the TreeView directly in the ResizableControl. However, we do need the actual UserControl there, hence why I'm looking for a fix. I'll send over a sample app that should reproduce the scenario for you.
Thanks,
-Craig
The scenario is that I have a .NET 4.0 datagrid with a template column. The cell template is a textblock but the editing template contains a PopupButton. Within the PopupButton is the ResizableContentControl, which is displaying a user control. Within the UserControl is a TreeView. I'm seeing that whenever I click in the ResizableControl area, unless I click perfectly on a TreeViewItem, the popup closes immediately and then reopens. My expectation would be that the popup would remain open until I actually select an item. I know that an item isn't being selected in the treeview since its SelectedItemChanged event doesn't fire.
My suspicion is that the UserControl is getting in the way somehow since I don't have the same problem if I add the TreeView directly in the ResizableControl. However, we do need the actual UserControl there, hence why I'm looking for a fix. I'll send over a sample app that should reproduce the scenario for you.
Thanks,
-Craig