How to create WPF dropdown pane
I would like to create a dropdown panel in WPF like a ComboBox / Expander hybrid. I'm currently using an Expander, but it pushes the controls underneath downward as it expands.
I just want it to work like a ComboBox and overlay it on the dropdown. I've looked at using popups, but they don't move with the main window when it moves.
So I've come to the conclusion that the closest control over my needs is a ComboBox, which allows me to put a Grid or StackPanel in my dropdown area.
Any ideas how to achieve this?
a source to share
I'm not really sure what you want to do:
But the layout is highly dependent on the parent control. If your controls are in a Stackpanel, all controls will move if the control expands or resizes. If you are using Canvas you can align controls on top of each other.
Also Adorner is useful when you want to overlay something over something else.
You can change the appearance of the ComboxBox and you can put a grid or whatever in it. Get familiar with ItemTemplate .
a source to share