question

GROSBOISTAO-5691 avatar image
1 Vote"
GROSBOISTAO-5691 asked ·

VSIX Project - Properties Tool window extension

Hello,
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. I've been lookig 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.

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 does'nt even show up anymore, the method has been replaced with a 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).

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.

dotnet-csharpvs-msbuildvs-extensionsdotnet-wpf-xaml
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GROSBOISTAO-5691 , welcome to Microsoft Q&A forum. Please kindly check if these Visual Studio extension related documents help: Extend properties, Extend the Properties, Task List, Output, and Options Windows. You can try to develop from these starting points.


1 Vote 1 ·

Thank you ! I've been using these documents too but they don't really lead me to where I need to go. They are very helpful for creating new tool windows and I do rely on them, but I'm currently looking for a way to extend the "Properties" window. For example, when I click on a custom property in a control in a WPF window, I'd rather have a button instead of a textfield in the Designer. And this button would open a window specific to the edition of this type of property. But I can't seem to find information leading to this (it would really be something like the UITypeEditor, but it won't apply and I don't know why).

0 Votes 0 ·

Hi @GROSBOISTAO-5691 , I did some research, and it seems UITypeEditor class can be used and worked in the WPF project, refer to this thread: UITypeEditor equivalent in WPF. Perhaps you need to try to do some modifications for the codes?


1 Vote 1 ·

1 Answer

GROSBOISTAO-5691 avatar image
1 Vote"
GROSBOISTAO-5691 answered ·

Hiya, thank you. I've been using this link too and it was why I thought I ought to use this UITypeEditor class, but I never found out how to apply it to WPF. However, I found an interesting thread that allowed me to do exactly what I needed here. Using the propertyValueEditor was what i actually needed and it works out real great.


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Good news, I am really happy to hear that you have found the solution and got what you want. Have a nice day :)

1 Vote 1 ·