Flex 4: How to center a component that is larger than its container?
I am using Flex 4 Spark Components for this one.

I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties

This does not work as expected:

   

    <s:BorderContainer x="300" y="300" width="200" height="200">
       <s:Button label="Not centered" horizontalCenter="0" verticalCenter="0" width="300" height="250"/>
    </s:BorderContainer>

Thanks!
Flex 4: How to center a component that is larger than its container?
===

I am using Flex 4 Spark Components for this one.

I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties

This does not work as expected:

   

    <s:BorderContainer x="300" y="300" width="200" height="200">
       <s:Button label="Not centered" horizontalCenter="0" verticalCenter="0" width="300" height="250"/>
    </s:BorderContainer>

Thanks!