Advertisement

WPF 加载 GIF 的五种方式 (Storyboard, WpfAnimatedGif, ImageAnimator, PictureBox, MediaElement)

阅读量:

部分内容参考博文WPF 如何显示gif

一、采用Storyboard进行设计

展示效果:

(1)XAML格式的页面结构:

复制代码
 <Window x:Class="PlayGifDemo.StoryboardWindow"

    
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    
     xmlns:local="clr-namespace:PlayGifDemo"
    
     mc:Ignorable="d"
    
     T

全部评论 (0)

还没有任何评论哟~