Problem after moving programmatically

2 posts, 0 answers
  1. Lukas
    Lukas avatar
    42 posts
    Member since:
    Feb 2009

    Posted 04 Nov 2010 Link to this post

    Hi,

    i have an application where multiple Windows are open at once.
    I have written a function to align and resize them, to show all at once in a grid like layout.

    The code looks like this: (AllWindows is a list of all my windows; here used in a for-loop)

    AllWindows(i).myProductWindow.Height = can_Desktop.RenderSize.Height
    AllWindows(i).myProductWindow.Width = (can_Desktop.RenderSize.Width / 2) - 5
    Canvas.SetTop(AllWindows(i).myProductWindow, getPosition(can_Desktop).topLeft.Y)
    Canvas.SetLeft(AllWindows(i).myProductWindow, i * (can_Desktop.RenderSize.Width / 2))

    This works great, but when I try to move or resize the windows after this function, the window jumps to the position it had before I ran the function and moves/resizes there although my mouse cursor moves in the area where I initially clicked.

    Is there a better way to move windoes than Canvas.Top/Left or is there a way how I can tell the windows to forget theri old positions?


    thanks in advance
    Lukas
  2. George
    Admin
    George avatar
    1332 posts

    Posted 10 Nov 2010 Link to this post

    Hi Lukas,

    Could you please give us more information about this problem? If you send us a sample running project that represents the described scenario, it would be very helpful. I will be glad to assist you further. 

    Kind regards,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top