Assume 2 images, a big one for Background and an smaller one for Foreground. The foreground stays exactly at the middle of the background, covering a relative amount of it (e.g. 50%) so the User sees them as a single image.
The problem is that I need the Background to fill the Window in various sizes. Setting its Stretch value to UniformToFill will do that. But how can I keep the foreground still covering 50% of the background?
It would be better to use a Vector Image, because it can scale ‘itself’ when you resize its container.
Then you set margin based on the window size as below:
To always use 50% of the window, you can use a Converter to bind the properties.
Also, maybe this can help you.