(X) Hide this Join our next live webcast on December 15th, 10 am PDT - Building a Silverlight 4 application end-to-end. Presenter: Gill Cleeren
Check the webinar agenda | Register for the webinar
Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 1 result for Arrange.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 1 comments  /  posted by  Nikolay Raychev  on  Apr 09, 2008 (more than a year ago)

    In response to Joe’s comment on the Canvas article about how the Canvas control deals with the Measure/Arrange process when it is laid out by a parent Panel:

    It seems that during Measure/Arrange process the child Canvas will take zero width and height provided these properties are not set, even if it contains some controls. Here is a little example:

    XAML:

    <UserControl x:Class="CanvasInCanvas.Page"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Width="400" Height="300">
        <Canvas x:Name="cnvControlHolder" Background="White" Height="300" Width="400">
            <Canvas x:Name="cnvInner" Canvas.Top="10" Canvas.Left="10" Background="Blue">
                <Button x:Name="btnHello" Content="Hello Joe :)" Canvas.Top="0" Canvas.Left="0" Margin="10"></Button>
            </Canvas>
        </Canvas>
    </UserControl>

    We don’t see the Blue background of the inner Canvas because its size is zero.