Search code examples
xamlexpression-blend

Resizing elements in Expression Blend Preview 4


I'm walking through Adam Kinney's Blend tutorials (http://visitmix.com/labs/rosetta/EyesOfBlend/) and I'm seeing some puzzling behavior with resizing objects. Specifically, at this step (http://visitmix.com/labs/rosetta/EyesOfBlend/Drawing/#08) I'm seeing two different behaviors resizing elements. Before I group the 3 circles into a grid, if I select all 3 they all resize the way I would intend with each circle growing and shrinking to the appropriate size to maintain the original proportion and position. Now, if I group the circles into a grid and then try to resize, resizing still occurs but the proportion of the 2 inner circles does not hold. Ultimately, if I want to try resizing everything on the page, I get the latter behavior which isn't what I want. Is this intended behavior of resizing within a grid? XAML below:

<Grid x:Name="LayoutRoot" Background="White">
    <Ellipse Margin="120,40" Stroke="Black" StrokeThickness="5">
        <Ellipse.Fill>
            <RadialGradientBrush>
                <GradientStop Color="#FFFDF365" Offset="0.349"/>
                <GradientStop Color="#FFDEAE32" Offset="1"/>
                <GradientStop Color="#FFFEE834" Offset="0.711"/>
            </RadialGradientBrush>
        </Ellipse.Fill>
    </Ellipse>
    <Grid HorizontalAlignment="Left" Height="105" Margin="187,111,0,0" VerticalAlignment="Top" Width="105">
        <Ellipse Stroke="Black" StrokeThickness="5">
            <Ellipse.Fill>
                <RadialGradientBrush>
                    <GradientStop Color="#FF545454" Offset="1"/>
                    <GradientStop Color="White" Offset="0.845"/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse Fill="#FF935D09" Margin="31,30,30,31" Stroke="Black" StrokeThickness="5"/>
        <Ellipse Fill="White" Margin="38,38,50,50" Stroke="Black" StrokeThickness="0"/>
    </Grid>
</Grid>

Solution

  • The resizing behavior depends on which handles you grab, which may not be evident until you zoom in. I've posted a blog entry that hopefully explains what is going on.