Express yourself! Share your work with other members of the Expression Community.

Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.

Resize Behavior

Average Rating:  (5)
Description
Discussions (7)

  • combine with MouseDragElementBehavior
    1 Posts | Last Post August 26, 2011
    • Has anyone had this work? I tried this and had a problem. When I move the rectangle around the screen then try to resize, the resize control's visual helper shows that its still in the origonal position. I cant find any exposed properties to control the X and Y position. how do i fix this?
  • Can this behavior be applied to dynamic rectangles
    1 Posts | Last Post August 06, 2011
    • Hi,
      
      Can we make this behavior bind to dynamic shapes (Rectangle to be more precise).
      I have a SL 4 app, in this app i draw shapes (rectangles) on mouse left click, drag, release actions. Now i wish to apply this behavior to any of these rectangles.
      
      Is it possible ?
      
      Thanks 
  • Strange behaviour when using a grid instead of a rectangle?
    2 Posts | Last Post January 25, 2011
    • Hi, great behaviour though I have a minor problem when I use a Grid instead of a Rectangle as resizable object. When drgging in the edges, the Grid resizes as supposed, but it slightly moves in the direction I'm dragging as well?
      
      Is this bug easy fixed?
      
      Thanks!
      
      
    • Sorry, same problem as below.
      
      Anyway, I succeded to solve the problem. In the source (ResizeBehaviour.cs) file, in the resize void, change:
      
                  double newHeight = this.AssociatedObject.ActualHeight;
                  double newWidth = this.AssociatedObject.ActualWidth;
      
      
      to
      
                  double newHeight = this.AssociatedObject.Height;
                  double newWidth = this.AssociatedObject.Width;
      
      Hope this helps anyone!
  • Bug ?
    1 Posts | Last Post July 19, 2010
    • I have very strange behaviour when I'm resizing control by edges: LeftBottom, Left, LeftTop, Top, RightTop. When I'm doing it very slow  all is ok, but when I'm doing it at normal speed then position of object is changing wrong.
      
      In this example it can be reproduced by resizing container (with white border) by TopRight edge.
      
      How can i fix this ?
  • Bad Zip File?
    1 Posts | Last Post January 02, 2010
    • I have attempted to download the solution in IE, FF and Chrome...and each attempt to open the zip file fails.
  • Nice
    1 Posts | Last Post November 08, 2009
  • MouseDragElementBehavior issues
    2 Posts | Last Post November 05, 2009
    • When this behavior is used with drag behavior they're not working as expected (or not working at all)
    • This effect is caused by 2 factor:
       1- drag behavior intercept mouse down before the resize behavior.
       2- movement effect is probably done using a translate transform.
      
      I will work on improve resize behavior comportment. Thanks for the signaling.

Details

Rate it:
 
 
 
 
 
  • Share It:
    E-mail Twitter del.icio.us Digg Facebook
  • Add To Favorites
  • Published: 10/9/2009
  • Tags: nested, resize
  • License Information:
    This contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.