Welcome to Manicprogrammer Sign in | Join | Help

Silverlight with A Set Of Canvas Inside A StackPanel

What would you expect to be rendered from the following? Answer in the next post.

Personally I’d expect a vertical stack of canvas each with a button and combobox beside one another. Short answer. Nope!

   1: Notice the nested canvas and the controls list a location relative to Canvas 
   2:  
   3:  
   4:  
   5:            <Canvas>
   6:                <StackPanel>
   7:                    <Canvas>
   8:                        <Button Canvas.Top="0" Canvas.Left="0" Width="50" Height="30" Content="-->"></Button>
   9:                        <ComboBox Canvas.Top="0" Canvas.Left="60" Width="250" Height="30"></ComboBox>
  10:                    </Canvas>
  11:                    <Canvas>
  12:                        <Button Canvas.Top="0" Canvas.Left="0" Width="50" Height="30" Content="-->"></Button>
  13:                        <ComboBox Canvas.Top="0" Canvas.Left="60" Width="250" Height="30"></ComboBox>
  14:                    </Canvas>
  15:                    <Canvas>
  16:                        <Button Canvas.Top="0" Canvas.Left="0" Width="50" Height="30" Content="-->"></Button>
  17:                        <ComboBox Canvas.Top="0" Canvas.Left="60" Width="250" Height="30"></ComboBox>
  18:                    </Canvas>
  19:                    <Canvas>
  20:                        <Button Canvas.Top="0" Canvas.Left="0" Width="50" Height="30" Content="-->"></Button>
  21:                        <ComboBox Canvas.Top="0" Canvas.Left="60" Width="250" Height="30"></ComboBox>
  22:                    </Canvas>
  23:                    <Canvas>
  24:                        <Button Canvas.Top="0" Canvas.Left="0" Width="50" Height="30" Content="-->"></Button>
  25:                        <ComboBox Canvas.Top="0" Canvas.Left="60" Width="250" Height="30"></ComboBox>
  26:                    </Canvas>
  27:                </StackPanel> 
  28:            </Canvas>
  29:  
Published Wednesday, March 25, 2009 8:13 AM by michaelruminer
Filed under

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Enter the text you see in the image:

Leave a Comment

(required) 
required 
(required)