.NET Framework Bookmark and Share   
 index > Windows Presentation Foundation (WPF) > Triggers instead of States in WPF (Expression Blend 3)?
 

Triggers instead of States in WPF (Expression Blend 3)?

I received this error when I edited a control template in Blend 3 and then opened the project in VS2008. If I run the project from Blend no problems occur but I cannot build it in VS2008.

Anyone has a solution for this problem?

Thanks for help!
  • Edited byxkrja Tuesday, September 22, 2009 5:00 PM
  •  
xkrja
Hi All,

Are you using VSM in WPF Toolkit? It's seems that it is a bug in VS2008, you can also compile and run it in VS2008 but with Error. Maybe VS2010 fix this problem?
  • Marked As Answer byxkrja Tuesday, September 22, 2009 5:49 PM
  •  
Tony.Tam
I believe that VisualStateGroups isa Silverlight class, not a WPF class. What are you using it for? I'm guessing thatthe reason you see the error is because your project does not reference System.Windows.dll.
  • Proposed As Answer bydekurver Tuesday, September 22, 2009 1:23 PM
  • Unproposed As Answer byxkrja Tuesday, September 22, 2009 1:39 PM
  •  
dekurver
Thanks for the reply! But what is strange is that it is a WPF-project. I created it from Blend 3 and it runs fine if I start it from Blend. I get the error when I try to build the same project in VS 2008!? Thanks again.
xkrja
Hi All,

Are you using VSM in WPF Toolkit? It's seems that it is a bug in VS2008, you can also compile and run it in VS2008 but with Error. Maybe VS2010 fix this problem?
  • Marked As Answer byxkrja Tuesday, September 22, 2009 5:49 PM
  •  
Tony.Tam
Thanks for the reply. Is it like dekurver said, that VSM is not possible to use in WPF? When I restarted my machine and opened Blend 3 again I received errors saying that VSM is not valid for WPF.

Should I use triggers instead of states in WPF?
xkrja
I believe VSM will be supported for WPF in .NET 4.0 and as Tony.Tam mentioned there is a preview version available in the WPF Toolkit, but it's difficult to advise further without knowing what it is you're trying to do.
dekurver
Ok. Sorry that I'm not really into WPF yet. I tried with the toolkit and it works! So now I only need to look into how to create custom states.

Thank for your help.
xkrja

You can use google to search for other answers

Custom Search

More Threads

• Exceptions in ElementHost/WinForms Hybrid Application
• In Canvas KeyDown event Can't work,why?
• Horizontal gridline stroke
• Ugly shadow on Vista
• Binding to ListBox using XMLDATAProvider and CollectionViewSource - huge performance problem
• GridView -> GridViewColumnHeader
• Deploying a WinFX windows Application
• Image element as child in Canvas
• GridLines Symbols
• Testing