Search code examples
c#wpfdatagridfloating

C# WPF DataGrid outside Window


I am building an application that requires a DataGrid that can be hidden. I have tried wrapping it in an Expander but it isn't exactly ideal. Ideally what I would like is the ability to have the DataGrid "floating" outside the main window without affecting the other controls and just having a button to hide and show it when needed.

Is this at all possible?

Thanks for your time.


Solution

  • You could put it in a Popup and change its IsOpen state to hide or show it. Though keep in mind that the Popup won't move around with the window.