kojimerと申します。
Silverlight4をVisualStudio2010とExpressionBlend4で開発しています。
ブレンドで新しいStoryboardを作成すると、作業中ドキュメントのPage.ResourcesやUserControl.Resourcesとして追加されますが、
追加されたStoryboardを、ResourceDictionaryに移して再生することはできないのでしょうか。
下記のように記述しましたが、TargetName Movie_grid を解決できません。と、エラーが出てしまいました。
resource = New ResourceDictionary()
resource.Source = New Uri("/SilverlightApplication_Demo;component/Resource/Dictionary4.xaml", UriKind.Relative)
Dim story1 As Storyboard
story1 = resource("change_SMALL")
story1.Begin()
ちなみにResourceDictionaryの記述は以下になります。
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Storyboard x:Name="change_SMALL">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="Movie_grid">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.556"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="Movie_grid">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.556"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="Movie_grid">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="-124.889"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="Movie_grid">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="-78"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ResourceDictionary>
どなたかご存知でしたら、どうかよろしくお願い致します。