View Single Post
Old 10-08-2008, 02:01 PM   #5
lodidodi
Enhanced Imperial Golem
 
lodidodi's Avatar
 
Join Date: Aug 2002
Posts: 248
Interface Author - Click to view interfaces
Default

Quote:
Originally Posted by Kaliaila
For the vast majority of people this offset thing is never going to make sense.
Lashden actually gave you a fairly good and straightforward description.

Unfortunately if you're using resizable windows you can't simply dismiss "this offset thing" without even trying to understand it, since offsets are the only way to handle a window with a changing height and width. It's actually a pretty simple concept if you think about it - an offset of 0 means no offset, so that means you're covering the entire window. An offset of 20 for all dimensions means you're leaving a 20 pixel border around all the edges uncovered.

If you're not allowing your window to be resized, then you can just use

<RelativePosition>true</RelativePosition>

and then use the static <Location> and <Size> tags to put the graphic at a location of 0,0 with a size matching the entire window, and remain blissfully ignorant about how anchors/offsets work.

EDIT: Actually it's been a while since I've worked on UIs so it might actually be "<AutoStretch>true</AutoStretch>" that determines if it uses the anchors/offsets or the location/size.

Lodi Dodi
lodidodi is offline   Reply With Quote