English 中文(简体)
摘录
原标题:Animated Gif doesn t animate in WPF

• 如何在WPF用户控制下对每个框架进行消毒? 此处仅显示第1框架。

<UserControl.Triggers>
    <EventTrigger RoutedEvent="Button.Click" SourceName="btnPressQ">
        <EventTrigger.Actions>
            <BeginStoryboard Storyboard="{StaticResource sbdShowAlfa}"/>
        </EventTrigger.Actions>
    </EventTrigger>    
</UserControl.Triggers>

<Button Grid.Column="2" Command="{Binding Path=PressAndRelease}" CommandParameter="Q" Style="{StaticResource TransparentButton}">
                <Button.Template>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Image Name="imgNormalQ" Source="/Wosk;component/Images/Alphaberts/Q1.png" Height="127" />
                            <Image Name="imgPressedQ" Source="/Wosk;component/Images/Alphaberts/DancingPeaks.gif" Height="262" Width="119" Margin="-23,-136,-21,0" Visibility="Hidden"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Panel.ZIndex" Value="999"/>
                                <Setter TargetName="imgPressedQ" Property="Visibility" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Button.Template>
            </Button>
问题回答

为什么不把ated子放在框架之外? 每一框架的预估结果将不利于估算,因为每个框架都必须在每一个框架上重新开始。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签