I have a TextBlock
which I move within a Canvas
via DoubleAnimation()
. On the enclosing Window SizeChanged
event, I am able to properly resize the TextBlock.FontSize
and inner Canvas
, but I am having problems getting the position of the TextBlock
correctly within the Canvas
. (I was trying to do some form of Canvas.SetTop(NameQueueTextBlock, <newVal>)
but that didn't work.)
<Canvas Grid.Column="1" ClipToBounds="True">
<Canvas Name="NameQueueCanvas" ClipToBounds="True" Height="79" Width="309">
<TextBlock Canvas.Top="0" Name="NameQueueTextBlock" FontSize="19" Text=" "/>
</Canvas>
</Canvas>