wpf VisualState conflicts with wpfToolkit?

喜欢而已 提交于 2019-12-05 14:53:20

This is what extern alias is for http://msdn.microsoft.com/en-us/library/ms173212.aspx

You can set this up through Visual studio by

  1. Right click on the WPFToolkit reference to view its properties,
  2. Change the "alias" field to anything you like.

The way that I have resolved this problem is to get a copy of the source code here, and modify it so that the VisualStateManager and related classes are in a different namespace (I chose System.Windows.VSM) It is kind of a pain, but it will work. I expect that the VSM will be removed from future versions of the toolkit but I can't prove it.

Meanwhile, there are a couple of things other that you can do, and each of them are kind of a pain + probably won't work, depending on your case.

  1. Drop the dependency to WPFToolkit. Your code probably needs it, so this won't really work. I was lucky and got away with it on one of my projects.
  2. Wait for the next release of WPFToolkit, and hope it gets fixed. Who knows when this will happen, its been almost a year now.
  3. Use blend 3, or something else that is compatible with your version of the Toolkit.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!