none
Blend 2 SP1 - Arrow keys move objects the wrong direction, Point movement screwy!

    Question

  •  After installing B2SP1 and opening up a project I've been working on, I get some strange behavior.

    When I try and move points around the ENTIRE path jumps in little increments...then if I try and move the entire path with the arrow keys, it behaves erratically - it's like the right-arrow key is stuck on...trying to move things up moved them up AND right, similar thing going down. Somethings moving things with the left arrow key doesn't work at all, or moves really slowly compared to moving things right.

     I was able to reproduce this copying the control into a new project, and I'll paste the code here if anyone might be up for looking into it.

      

    <UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Class="FlightGame.enemy1"
    d:DesignWidth="30" d:DesignHeight="30">

    <Canvas x:Name="LayoutRoot" >
    <Canvas Height="26.99" Width="26.851" Canvas.Left="1.563" Canvas.Top="1.498">
    <Rectangle Height="4.434" Width="4.434" Canvas.Left="3.114" Canvas.Top="3.462" Fill="#FF7B7B7B"/>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" Canvas.Left="19.313" Canvas.Top="3.462"/>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" Canvas.Left="19.167" Canvas.Top="19.23"/>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" Canvas.Left="3.263" Canvas.Top="19.23"/>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" RenderTransformOrigin="0.5,0.5" Canvas.Left="11.144">
    <Rectangle.RenderTransform>
    <TransformGroup>
    <ScaleTransform/>
    <SkewTransform/>
    <RotateTransform Angle="45"/>
    <TranslateTransform/>
    </TransformGroup>
    </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" RenderTransformOrigin="0.5,0.5" Canvas.Left="11.144" Canvas.Top="22.556">
    <Rectangle.RenderTransform>
    <TransformGroup>
    <ScaleTransform/>
    <SkewTransform/>
    <RotateTransform Angle="45"/>
    <TranslateTransform/>
    </TransformGroup>
    </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" RenderTransformOrigin="0.5,0.5" Canvas.Top="11.482">
    <Rectangle.RenderTransform>
    <TransformGroup>
    <ScaleTransform/>
    <SkewTransform/>
    <RotateTransform Angle="45"/>
    <TranslateTransform/>
    </TransformGroup>
    </Rectangle.RenderTransform>
    </Rectangle>
    <Rectangle Height="4.434" Width="4.434" Fill="#FF7B7B7B" RenderTransformOrigin="0.5,0.5" Canvas.Left="22.417" Canvas.Top="11.482">
    <Rectangle.RenderTransform>
    <TransformGroup>
    <ScaleTransform/>
    <SkewTransform/>
    <RotateTransform Angle="45"/>
    <TranslateTransform/>
    </TransformGroup>
    </Rectangle.RenderTransform>
    </Rectangle>
    </Canvas>
    <Ellipse Height="23.543" Width="23.543" Canvas.Left="3.228" Canvas.Top="3.228" d:IsLocked="True">
    <Ellipse.Fill>
    <RadialGradientBrush>
    <GradientStop Color="#FFFF0000"/>
    <GradientStop Color="#FF7B7B7B" Offset="1"/>
    </RadialGradientBrush>
    </Ellipse.Fill>
    </Ellipse>
    <Grid Height="30" Width="30"/>
    <Canvas Height="30" Width="30">
    <Path Height="28.888" Width="29.391" Canvas.Left="0.72" Fill="#B1FFFFFF" Stretch="Fill" Stroke="#7F000000" StrokeThickness="0.15" Data="M14.9375,0.5625 L25.2495,4.9379997 L29.174501,14.989647 L24.943502,25.116653 L14.438001,29.305361 L4.1191506,25.054642 L-0.068074554,15.11546 L3.8926389,4.8637271 z" Canvas.Top="1.001"/>
    </Canvas>
    </Canvas>
    </UserControl>
     

     The code-behind file is untouched, consisting of:

     

    using System;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    namespace FlightGame
    {
    public partial class enemy1 : UserControl
    {
    public enemy1()
    {
    // Required to initialize variables
    InitializeComponent();
    }
    }
    }
      
    Wednesday, October 08, 2008 2:29 PM

All replies

  • Hello, I was unable to reproduce the problem. Can it be some problem on your keyboard? Have you tried that on another machine? Also, to move a point with mouse, you need to use the "Direct Selection" tool (The second tool in the toolbox, or hit shortcut 'A').

    Thursday, October 09, 2008 1:01 AM
  •  Hmm I find it hard to believe it might just be the keyboard, as I haven't had the problem in any other program (including previous versions of blend) and even now it's only in some projects in blend. I'm not sure, though, what else might be casuing it - it's not a huge deal though so I guess I can live with it!

     

    As for the point - yes the 'Direct Selection' is the tool I am using. When you zoom in close and work with the points (say on a 30x30 canvas) you should (at least I do) see the other points move around when a different point is moved.  It seems to have something to do with re-arranging the width/height in relation to new point positions. It may be by design, I just find it frustrating at times trying to fine-tune small shapes.

    Thursday, October 09, 2008 12:30 PM