本文介绍了如何在Custom EditorFactory中为FlavoredProject执行自定义验证.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过继承C#项目创建了一个风味项目.我的自定义ProjectItem有一个自定义设计器(从UserControl继承),为此我通过实现IVsEditorFactory接口创建了一个EditorFactory类.当前自定义ProjectItem可以正常打开.
现在我想在我的ProjectItem设计器中添加一些自定义验证,并且也不想允许用户在验证失败时保存一个项目.
请让我知道如何实现.
I have created a flavored project by inheriting the C# project. My custom ProjectItem has a custom designer (inherited from UserControl) and for that i have created a EditorFactory class by implementing an IVsEditorFactory interface. Currently custom ProjectItem is opening properly.
Now i want to add some custom validation in my ProjectItem designer and also dont want to allow a user to save an item if validation fails.
Please let me know how to achieve so.
推荐答案
这篇关于如何在Custom EditorFactory中为FlavoredProject执行自定义验证.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!