OK, I have an image for my plugin defined in XML as:
When I set my image in code, I've added the option to keep aspect ratio and center:
But the image is still populated top-left, not in the center.
I'm guessing I need to set the width and height to fill the screen size, but not sure how to achieve that?
XML:
<window>
<id>3355</id>
<defaultcontrol>4</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<controls>
<control>
<description>image</description>
<type>image</type>
<id>4</id>
<posX>0</posX>
<posY>0</posY>
</control>
</controls>
</window>
When I set my image in code, I've added the option to keep aspect ratio and center:
Code:
image.KeepAspectRatio = true;
image.HorizontalContentAlignment = MediaPortal.Drawing.HorizontalAlignment.Center;
image.HorizontalAlignment = MediaPortal.Drawing.HorizontalAlignment.Center;
image.VerticalAlignment = MediaPortal.Drawing.VerticalAlignment.Center;
But the image is still populated top-left, not in the center.
I'm guessing I need to set the width and height to fill the screen size, but not sure how to achieve that?