Using Zoomcontrol in a stackpanel doesn't work

Oct 22, 2012 at 3:28 PM

I'm sure others have had this problem before. I'm trying to add a horizontal toolbar to the top of my page, so I have a stackpanel for the controls at the top. Then my zoomcontrol is wrapped around the graphsharp object. What I can't get my head around is that if I take the zoomcontrol (and graphsharp) out of the stackpanel the graph shows, if it's in the stackpanel, it is just a blank screen. Here is a code sample:


        <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
                <Label Name="lblClientGroup" >Get Client Group:</Label>
                <TextBox Name="txtClientGroup" Width="100px" ></TextBox>
                <Button Name="btnGetGraphForClientGroup" >Get Graph for Client Group</Button>
                <graphsharp:GraphLayout x:Name="GraphLayout" 
                                Graph="{Binding ElementName=root,Path=GraphToVisualize}"