"Edit a copy" option disabled in Visual Studio for custom control - visual-studio

I created a custom user control "controls:MyControl" using xaml and winrt/c++. This control is part of a nuget package.
To test for further modification from user side, I added the package to a sample project. Now when I try to copy the template of custom control using "Edit template" and "Edit a copy" in VS 2022, the "Edit a copy" option seems to be disabled.
Please suggest if there needs to be any extra step done for copying the template of a custom control.
Also as a 2nd question, for some of my modified controls I am not able to copy the "Style" but "Template" only. Read through the documentations but couldn't get much help. It would be great if anyone could help with these 2 queries.

Related

Could not hide unwanted Options Page navigation items from Tools-Options

I am working on Visual Studio Isolated Shell Project.
I saw on MSDN that in order to remove Options Pages, I have to edit the .pkgundef file.
I disabled the Database Tools package
// Visual Database Tools Package
[$RootKey$\Packages\{220A4C17-7E7C-4663-BBCC-5E607C6543CD}]
The package is gone, I don't see any window or menu command for that. But when I launch the Options dialog from Tools menu, I see the navigation item and when I choose that, I see the "Error page"
How do I hide the navigation item?
I found the solution on MSDN Forums.
In my specific scenario, I had to add the following key to .pkgundef file.
[$RootKey$\ToolsOptionsPages\Database Tools]

How do you enable "Dynamic Content" for the Start Page?

On the Start Page for Visual Studio 2013, there is a section entitled "Announcements".
Underneath that section it says:
Stay current with announcements about Visual Studio. To see the announcements please enable dynamic content.
My question is simple: Where do I go to enable "dynamic content"?
There's also a section entitled Product Videos. Underneath it is the following message:
We have a lot of great content to show you, but we need your permission to keep it updated.
Is this also enabled if you enable "dynamic content"? Or is there another setting I need to enable?
In Visual Studio 2013, to enable the dynamic content that is displayed on the Start Page, do the following:
Tools -> Options
Under the Environment node, select "Startup"
Check the box to "Download content every:" and select your interval.
Click OK
Your content should immediately start to populate.

Prevent custom tool from running when I save a file

Visual Studio has a feature called Custom Tools. The Custom Tool will run every time I save a file or, if I click the "Run Custom Tool" menu item. Is there a way to make it run only when I click the Run Custom Tool menu item?
I don't believe there is any way to discriminate from within the custom tool code. This may be stating the obvious, but it sounds like a normal VS add-in would be more appropriate in your case.

How to add controls from a control library to VS studio toolbox automatically (WP7)?

I want to achieve that when the user installs the WP7 control library he will find it in the Visual Studio toolbox automatically without manually adding it. In addition I would like to organize toolbox tabs in a logical manner.
I know it can be done for other platforms. For example I tried writing *.design.dll as described here - it does not work for WP7.
Any pointers how to work with toolbox for VS 2010 / WP7?
Nobody answered, so here is my brief summary:
The control library cannot be added to the Toolbox automatically unless you program VS plugin (package). Too much work for me...
*.design.dll (see the link above) basically works.
2a) You can hide controls from the Toolbox (BrowsableAttribute) and you can define control icons. That's probably everything you can do for Toolbox. The user has to add Toolbox tabs and "choose items" manually.
Well, I am not quite sure here, because when you drop the control dll file onto the Toolbox, then at least ToolboxTabNameAttribute works, i.e. corresponding Toolbox tabs are created automatically. Unfortunately, the tab is empty.
Also, when the control library is properly installed, then some of the controls are added to Choose items Toolbox dialog. Unfortunately, in my case most of the controls are missing and have to be added by manual browsing.
2b) Designer support (Properties window for the control) is better. You can hide properties (BrowsableAttribute), define categories (CategoryAttribute) and define descriptions (DescriptionAttribute).
Descriptions can be extracted from you documentation xml file, so that you don't need to write them again. To get the code google for MetadataBase.cs. Just be carefull, the files you'll find contain fatal bugs (ParseDescription method) and ignore some properties (getters that return a collection).
After all, the result is not that bad.

"Save Copy of Package as..." option missing

In Visual Studio 2005 Professional, under Menu Bar "File", I do not have the option "Save Copy of Package AS..." which allows saving the package on the server. How do I get this option to display and be useful?
Do you mean "Save Project as..."?
If so, yeah it's kind of a pain moving a VS project. I usually just copy the directry tree using normal file copy commands, and fix up whatever problems crop up as a result manually. Usually it's not bad - most of the project information deals with relative file locations pretty well.
Kinook Software has a utility that's supposed to help with this. Try it if you think it has value:
http://www.kinook.com/CopyWiz/
You could activate it by customizing your menu. See http://asqlb.blogspot.com/2010/12/save-copy-as-is-not-option-visual.html
If grayed out, drag the selected option to the file menu and drop it under "save as".

Resources