TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Burak Seyhan
NA
321
30.2k
Wpf Gif Animation
Mar 11 2015 6:51 AM
public MainWindow()
{
InitializeComponent();
}
private string path = "/LoadSampleWpf;component/Image/loading.GIF";
public Image img { get; set; }
public BitmapImage Image { get; set; }
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.Image = new BitmapImage();
this.Image.BeginInit();
this.Image.UriSource = new Uri(path, UriKind.RelativeOrAbsolute);
this.Image.EndInit();
img = new Image()
{
Width = 100,
Height = 100,
StretchDirection = StretchDirection.DownOnly,
Stretch = Stretch.Fill,
Source = Image
};
ImageBehavior.SetAnimatedSource(this.img, this.Image);
ImageAnimationController controller = ImageBehavior.GetAnimationController(this.img);
if (controller != null)
{
controller.Play();
}
}
This code doesn't work. Any solution for that ?
Reply
Answers (
0
)
[WPF] DataTriggers: remove property set by onother triggers
[WPF] Use element of another UserControl