I have the following code:
<Window.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="LayoutTransform">
<Setter.Value>
<TranslateTransform />
</Setter.Value>
</Setter>
<Style.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" AutoReverse="True">
<DoubleAnimation
From="300"
To="-300"
Storyboard.TargetProperty="LayoutTransform.X"
Duration="0:0:1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
<TextBlock
Grid.Column="1"
Text="This is a sample text."/>
<Rectangle Grid.Column="0" Fill="AliceBlue"/>
<Rectangle Grid.Column="2" Fill="Aquamarine"/>
Basically what I'm trying to achieve is that the content of TextBlock should be scrolling from right to left (and back). Somehow this Style doesn't do anything. If I change TranslateTransform to ScaleTransform and change LayoutTransform.X to LayoutTransform.ScaleX the TextBlock is animated just fine. Is this a bug in WPF or am I missing something?