This is a migrated thread and some comments may be shown as answers.

Problem after moving programmatically

1 Answer 30 Views
Window
This is a migrated thread and some comments may be shown as answers.
Lukas
Top achievements
Rank 2
Lukas asked on 04 Nov 2010, 11:13 PM
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

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 10 Nov 2010, 09:01 AM
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
Tags
Window
Asked by
Lukas
Top achievements
Rank 2
Answers by
George
Telerik team
Share this question
or