Reputation:
I'm trying to test out this Animation Timeline Class found here from the MSDN site, but having problems getting the proper references loaded. I'm currently targeting .NET 4.5. Everything after System.Windows
is causes an error saying that none of the last 5 exists in System.Windows
. But when I check the list of references/try to add them in, none of them (other than System.Windows
) are listed.
using System;
using System.Windows;
using System.Windows.Navigation; <--- From here down, none exist
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Controls;
Is there a way to get Visual Studio to recognize them?
Upvotes: 0
Views: 392
Reputation: 11252
The AnimationTimeline
class is a part of Windows Presentation Foundation (WPF). I suspect your project was created as a Windows Forms application. These are very different technologies and normally you don't mix them together, except in special cases.
If you look at the same MSDN page that you linked us, you will see that it is written as follows:
Assembly: PresentationCore (in PresentationCore.dll)
So in order to use that class you must add a reference to PresentationCore.dll. You also usually want to reference PresentationFramework.dll and WindowsBase.dll at least for the core WPF functionality.
If you simply create a new WPF Application in Visual Studio it should have the appropriate references.
Upvotes: 2