If I have a element with a Offset of "0%,50% and I want to move it to 0%,0% but with a animation… Its the same the 50% offset that <Move Y=“0.5” RelativeToSize=“Size”???
RelativeToSize=“Size” is in %? The same % of Offset?
If I have a element with a Offset of "0%,50% and I want to move it to 0%,0% but with a animation… Its the same the 50% offset that <Move Y=“0.5” RelativeToSize=“Size”???
RelativeToSize=“Size” is in %? The same % of Offset?
Yes, both are relative to the size of the element, it’s just that one is specified in percent and the other not (so obviously 50% = 0.5).
Personally I prefer to keep the units the same and just use translations when doing stuff like this.
Either by just having one translation which I change:
<Button Alignment="Top">
<Translation ux:Name="trans" Y="0.5" RelativeTo="Size"/>
<WhilePressed>
<Change trans.Y="0" />
</WhilePressed>
</Button>
or by moving the element relative to the initial position:
<Button Alignment="Top">
<Translation Y="0.5" RelativeTo="Size"/>
<WhilePressed>
<Move Y="-0.5" RelativeTo="Size" />
</WhilePressed>
</Button>
Great! Thanks!