I'm trying to figure out, how to write Responsive UI in XAML.

I would like to have 2 controls on my window. MinWidth of each control id 400.

If Width of windows is >800, Width of each control should be 50%, if we change widht of window to <800, each control should have 100% of window.

It's pretty simple to set up something like that with HTML/CSS, and right now I'm trying do it in WPF without progress.

Can you help me with that?

I tried to handle that with WrapPanel, but it does not work. It wraps properly, but does not change width of control.