During Measure, I'm still really confused because this results in stackpanel's child (signalgraph) being given (292,Infinity) as the availableSize in Measure:
<Window x:Class="paneltesting.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpfExp="clr-namespace:WpfExperimental"
Title="Window1" Height="300" Width="300">
<StackPanel
>
<wpfExp:SignalGraph/>
</StackPanel>
</Window>
While with a canvas of a set size the child is given (infinity, infinity) for its available size. I assume that this has something to do with an interaction with the window, but I'm really confused as to what is going on.
<Canvas Width="100" Height="100">
<StackPanel SizeChanged="ScrollViewer_SizeChanged"
>
<wpfExp:SignalGraph/>
</StackPanel>
</Canvas>
The same thing occurs when a scrollviewer is used. I just wanted to be able to understand how scrollviewer gives sizes to its children. I was wondering if changing the panels in its controltemplate might result in a scrollviewer that just passes the scrollviewer size as the availableSize to its child instead of infinite space.
I've already coded a work around, but I just want to understand this, so that I'm certain that there wasn't some much easier way to get the behavior I wanted.