Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:16:00+00:00 2026-06-12T11:16:00+00:00

I am trying to use library from https://github.com/XamlAnimatedGif/WpfAnimatedGif/ to solve my animation gif using

  • 0

I am trying to use library from https://github.com/XamlAnimatedGif/WpfAnimatedGif/ to solve my animation gif using wpf. I wrote some code to bind the image to the Image, but it is not working.

WPF:

<Image gif:ImageBehavior.RepeatBehavior="Forever"
           gif:ImageBehavior.AnimatedSource="{Binding ElementName=WpfAnimation, Path=ImageStatus}"/>

Code Behind:

// Image status property
        public readonly DependencyProperty ImageStatusProperty;
    public ImageSource ImageStatus
    {
        get { return (ImageSource)GetValue(ImageStatusProperty); }
        set { SetValue(ImageStatusProperty, value); }
    }

    public MainWindow()
    {
        InitializeComponent();
        ImageStatus = new BitmapImage(new Uri("Images/anipier_e0.gif", UriKind.Relative));

    }

Error:

System.Windows.Markup.XamlParseException was unhandled
  HResult=-2146233087
  Message='The invocation of the constructor on type 'WpfAnimation.MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line position '9'.
  Source=PresentationFramework
InnerException: System.ArgumentNullException
       HResult=-2147467261
       Message=Value cannot be null.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:16:02+00:00Added an answer on June 12, 2026 at 11:16 am

    I think something is wrong with your binding : AnimatedSource is binding to an element named “WpfAnimation”. You should bind the AnimatedSource to a property of your DataContext. If WpfAnimation is similar to LayoutRoot, use an expression like this :

    <Image gif:ImageBehavior.RepeatBehavior="Forever"
               gif:ImageBehavior.AnimatedSource="{Binding ElementName=WpfAnimation, Path=DataContext.ImageStatus}"/>
    

    Also, check the Debug/Output for binding errors, that the animated gif is a resource, that your Uri is valid, and that a DataContext is associated to your view.

    EDIT:

    Looks like there is a exception in the view constructor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the authorize.net library for CI2.0 from https://github.com/cloudmanic/codeignitor-authorizenet-cim-library When running fulltest()
I'm trying to use a ThreadPool implementation from this fellow: https://github.com/progschj/ThreadPool I'm having trouble
I'm trying to use MongoDB with my POCOs. Using mongodb-csharp library ( http://github.com/samus/mongodb-csharp ),
I'm trying to use the TouchListView made available here: https://github.com/commonsguy/cwac-touchlist . It's an Android
I'm trying to use the jasmine-jquery plugin: https://github.com/velesin/jasmine-jquery . In the documentation it says
I am trying to use the sample code from https://developers.google.com/drive/v2/reference/files/insert#examples . In particular: FilesResource.InsertRequest
I'm trying to use the WMI example from msdn: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384724%28v=vs.85%29.aspx I've copied the last
I am trying to use the twitter-text-rb (https://github.com/twitter/twitter-text-rb) in my Rails 3 app. I
I'm trying to use iCarousel (https://github.com/nicklockwood/iCarousel) and have added iCarousel.h & iCarousel.m to my
I'm trying to use a C++ library (CLucene) from my Cocoa Touch iPhone application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.