Reply to thread

OK, I have an image for my plugin defined in XML as:

 

[CODE=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>[/code]

 

When I set my image in code, I've added the option to keep aspect ratio and center:

 

[CODE=C#]image.KeepAspectRatio = true;

image.HorizontalContentAlignment = MediaPortal.Drawing.HorizontalAlignment.Center;

image.HorizontalAlignment = MediaPortal.Drawing.HorizontalAlignment.Center;

image.VerticalAlignment = MediaPortal.Drawing.VerticalAlignment.Center;[/code]

 

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?


Top Bottom