首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >动画时出现BAML错误

动画时出现BAML错误
EN

Stack Overflow用户
提问于 2011-04-02 12:01:03
回答 1查看 108关注 0票数 0

我在WPF 4项目中有以下代码,链接到imagebox。我还有另外四个类似的例子,它们完美地工作着。为什么这会抛出我们都讨厌的模糊的"BAML“错误(它指向动画)?仅供参考,我在后台代码中使用了VB.net。

代码语言:javascript
复制
<Image Height="121" HorizontalAlignment="Left" Margin="139,83,0,0" Name="Spinefish" Stretch="Fill" VerticalAlignment="Top" Width="323" Source="/VBP-WORD4WORD;component/Images/IMG-SPINEFISH1.png">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" />
                    <TranslateTransform X="0" />
                </TransformGroup>
            </Image.RenderTransform>
            <Image.Triggers>
                <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                    <BeginStoryboard>
                        <BeginStoryboard.Storyboard>
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Duration="0:0:60" RepeatBehavior="Forever" Storyboard.TargetProperty="RenderTransform.Children[1].X">
                                    <LinearDoubleKeyFrame KeyTime="0:0:0" Value="-1000" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:25" Value="-1000" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:30" Value="1000" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:55" Value="1000" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:60" Value="-1000" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Duration="0:0:60" RepeatBehavior="Forever" Storyboard.TargetProperty="RenderTransform.Children[0].ScaleX">
                                    <LinearDoubleKeyFrame KeyTime="0:0:29.9" Value="1" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:30" Value="-1" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:59.9" Value="-1" />
                                    <LinearDoubleKeyFrame KeyTime="0:0:60" Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard.Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Image.Triggers>
        </Image>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-04-02 12:22:29

KeyTime="0:0:60"Duration="0:0:60"不存在,秒数范围仅为0到59,请将其更改为0:1:0

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5521041

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档