By Irvin G.
When you are working with Windows Presentation Foundation, sooner or later you will find yourself working with floating panels. Once you are there, it will take no time until you need a floating panel that changes its height and/or width according to the area below.
This is quite easy to do directly on the XAML, with no need to write a single line of code in C#. Let’s explore how it is done.
First, you need to put all the controls you want to cover with your floating panel inside a StackPanel.
<StackPanel x:Name="MainContent" Margin="25,50,25,0" VerticalAlignment="Top">
<Grid…>
<Grid…>
<Grid…>
<Grid…>
<...