Getting window size and positions to calculate the center - Forum

Forum Navigation
You need to log in to create posts and topics.

Getting window size and positions to calculate the center

Hello :)

I have a somehow specific question, how to get the specific point on app window (eg. center of the app) if app window is maximized and resolution is not same.
Let's say i use 1920x1080. My original app size is made for fixed size,1920x1080, so using "Align" help me get a center of the app window.

But when i want to resize app window or a have another resolution (1440x900), my content (for example containers) is not anymore in the center.

How could i make some subroutine or a set of code for alignment button to monitor app window size and adjust the material accordingly ?

I've put almost everything in containers, so i can call them how they are needed, but i cannot get them to be where i want them.

Currently im using [Maximized] variable and my resolution to 1920x1080.

I hope i detailed issue enough to be understandable

 

Igor

@nypercro

Good time! Usually the "Snap Position" property is used for automatic alignment. More details can be found here:
https://winhelp.visualneo.com/Tutorial4CreatingaResizablePubli.html

Thx, i will try it :)