The above exception is thrown for this XAML application for Silverlight 4 application:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="NewtonsCradle.MainPage"
Width="640" Height="480">
<StackPanel Orientation="Horiontal">
<TextBlock Height="100" Name="TestText">Test</TextBlock>
<StackPanel.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="TestText"
Storyboard.TargetProperty="Height"
To="500"
Duration="0:0:1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</StackPanel.Triggers>
</StackPanel>
</UserControl>
Code behind:
using System.Windows.Controls;
namespace NewtonsCradle
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
}
}
What? For me, this seems quite reasonable based on the WPF background.
source
share