[英]VSIX Project - Properties tool window extension
There might be something wrong with the way I search for things but here is my problem.我搜索东西的方式可能有问题,但这是我的问题。 I'm looking for a way to implement a custom editing tool within the properties tool window in the Visual Studio editor.
我正在寻找一种在 Visual Studio 编辑器中的属性工具 window 中实现自定义编辑工具的方法。 I've been looking through several documentation references, and they all lead to the use of different assemblies, but I can't get anything to work the way that I want.
我一直在查看几个文档参考,它们都导致使用不同的程序集,但我无法以我想要的方式工作。
First of all, I tried using the UITypeEditor class, with the step-by-step tuto I found here: https://docs.microsoft.com/fr-fr/dotnet/api/system.drawing.design.uitypeeditor?view=net-5.0 The problem I faced was that it only seemed to be working with Winforms projects, and I'm trying to use this with a WPF project.首先,我尝试使用UITypeEditor class,以及我在这里找到的分步教程: https://docs.microsoft.com/fr-fr/dotnet/api/system.drawing.design.uitypeeditor?view =net-5.0我面临的问题是它似乎只适用于 Winforms 项目,我正在尝试将它与 WPF 项目一起使用。
Afterwards, I tried following this tutorial, in order to create a project template : https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-a-basic-project-system-part-1?view=vs-2019 This has led me to think that the methods used in the tutorial might have been either deprecated or improved with the used of AsyncPackages instead of ProjectPackages , and the appearance of the Microsoft.VisualStudio.Shell.Flavor assembly that seem to render useless the ProjectNode class (it doesn't even show up anymore, the method has been replaced with a void).之后,我尝试按照本教程创建项目模板: https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-a-basic-project-system-part-1?view= vs-2019这使我认为本教程中使用的方法可能已被弃用或改进,使用AsyncPackages而不是ProjectPackages以及Microsoft.VisualStudio.Shell.Flavor程序集的出现似乎使无用ProjectNode class (它甚至不再出现,该方法已被替换为 void)。
The last bit I tried exploring was the use of the ProjectSystem , as documented here: https://github.com/microsoft/VSProjectSystem It was actually worse because I couldn't get it to work like I wanted, the project type I was creating could not register C# files and I wasn't able to add new classes (I might need to dig a bit deeper here but I don't know where to look).我尝试探索的最后一点是ProjectSystem的使用,如此处所述: https://github.com/microsoft/VSProjectSystem实际上更糟,因为我无法让它像我想要的那样工作,我的项目类型是创建无法注册 C# 文件,我无法添加新类(我可能需要在这里更深入地挖掘,但我不知道在哪里看)。
So basically, I'm looking for help to extend the properties tool window, through an editor within the window, or a modal window opened by clicking on an ellipsis button in the properties window. So basically, I'm looking for help to extend the properties tool window, through an editor within the window, or a modal window opened by clicking on an ellipsis button in the properties window.
Thank you for reading this, if you have any info, I'm very interested.感谢您阅读本文,如果您有任何信息,我很感兴趣。
I've actually found a thread leading to what I was trying to do here .我实际上已经找到了一个导致我在这里尝试做的事情的线程。 This tutorial leads to a way to implement a customized editor, either inline, extended or in another dialog window.
本教程介绍了一种实现自定义编辑器的方法,无论是内联的、扩展的还是在另一个对话框 window 中。 This was the thing I needed, and with a few tweaks I managed doing what I wanted.
这是我需要的东西,通过一些调整,我设法做到了我想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.