CodePlexProject Hosting for Open Source Software
Does anyone know how I can control the initial position of a window? I've tried all the normal methods none of which are working.
My goal is to save the x,y location so I can restore the window positions.
Thanks,
Rick
Hi Rick
I need the same thing. If the windows where placed inside a Canvas instead of a Grid we would be able to solve this by using the horizontal and vertical offset values..
Dears,
You can save the Windows position over a Grid throught the Margin property. Just save this property and set it on window construction.
Vítor
Could you show me a small example where this is done?
I tried setting the margins but could not get it to work.
Hi all!
I just tested here: it's need to save and restore the following properties: Width, Height and Margin.
Can you please post some code?
Sample to setup margins shift Left=50 and Top=50 from the center:
window.Margin = new Thickness(50, 50, -50, -50)
[$AUTHOR$] wrote: [$CONTENT$]