I'm programming a simple DialogPropertyValueEditor for a property of a User Control.
So I have three projects in my solution:
MyUsercontrolProject
MyUsercontrolProject.Design
WPFWindowTest
The MyUsercontrolProject.Design contains a WPF window (call it QueryDesigner) that has to be open when the user click the "..." button on the Usercontrol's property in WPFWindowTest.
The problem is that everytime I made a change in MyUsercontrolProject.Design the WPFWindowTest project fails to load the QueryDesigner window with the message:
MyUsercontrolProject.Design.QueryDesigner does not have a resource identified by the URI '/MyUsercontrolProject.Design;component/DesignerFolder/queryDesigner.xaml'.
I need to perform a random series of Close/Open/Recompile/Clean to have the window showed.
Can you please help me to solve this issue?
Related
I am trying to add a panel to visual studio for my extension. I want it to be similar to the server explorer but just be below it. Does anyone know how I can add a blank panel like that just below the server explorer for my extension? I want to display some text on that panel.
You need to create a tool window and then manually position it at the desired place.
See Async Tool Window example to get started.
Also, you can find the guide here: create an extension with a Tool Window.
Just create a new VSIX project and add the tool window Item template. It works like a wpf window, you can modify its xx.xaml file to set the window's appearance. Add a textbox to display some texts or what. You can build and debug it(F5) to start the experimental instance. During debugging, go find your window and open it. Then drag it to left layout and it will display next to the server explorer.
When dragging the window, choose the left layout:
And to make it locates just below the server explorer:
(Sometimes the custom panel is above not below the server explorer)You can change the order by the pin button. Click it twice can help.
If I make non-modal window I get different problems. Firts of all I open the Experimental version of Visual Studio and open a Solution where I navigate to a C# page. Then I open my Extension's WPF window where I can happily type into TextBoxes in that WPF window. However, whenever I click the backspace [<-] or the [delete] keys, this doesn't affect the current WPF textbox but the previously opened C# code window in the current solution. I open my window in this way:
window = new MyWindow()
window.show();
I know that I could resolve my problem with :
uiShell.EnableModeless(0);
window = new MyWindow()
window.ShowDialog();
uiShell.EnableModeless(1);
But I don't want this solution. I want to navigate file in visual studio shell and at the same time using my addin without having problem with input. How Can I resolve this problem using Show() ?
If you want to display a "non-modal" window, it needs to be a toolwindow, or a document window. Otherwise, VS will not know about it, and you'll encounter all sorts of problems with it not getting messages, events, accelerators, etc...
If you want a modal window, use the DialogWindow class as previously mentioned to ensure the IDE can properly disable/enable it's windows when the dialog is displayed or dismissed.
Sincerely,
I've been creating a new webforms website in c# and been working exclusively in source view until yesterday when I wanted to create a method for a button click for the only dynamic part of the site and I was confronted with this:
I've never seen this before! Every page is the same and it reoccurs on another machine with VS 2013 The site renders fine and publishes without issue. Other websites work fine, so it's got to be this project.
I don't know if this is a separate issue or is part of the same problem, but I managed to link up the button to a method using Resharper, but data from textboxes are not passing to the method, which again I've never had before.
It's a 30 page bootstrap site (replacing an old site) that I've nearly finished! Am I screwed??
Any help would be appreciated.
EDIT:
It's not that I'm worried about seeing the page render in design view. I never use it. I just want to be able create the button click event method. At the moment the button click is just reloading the page and not passing form data to the method.
This happens due to improper termination of the Visual Studio processes due to which the files get corrupted for which you might need to use system restore or re-installation of the product. Still assuming that its caused due to some setting mismatch we can perform the following steps.
1.right click on an html file listed in Solution Explorer
2.in dialog box that opens click on: Open With...
3.click on: HTML (Web Forms) Editor, AND on the right pane click on Set it As Default
after this action all html files that you open have options: Design...Split...Source.
Reference : http://social.msdn.microsoft.com/Forums/vstudio/en-US/25d6c666-6216-4fa8-992b-f9bb088dfc7d/visual-studio-2013-missing-design-source-and-split-buttons
I was working on a ASP.NET web forms project and was trying to attach a data source to a repeater using wizard. My Visual Studio window suddenly hanged for some seconds and during that time I saw a popup minimized window:
.
Can someone please tell me what it is? And why its showing default icon of Windows Forms? Is it some internal process of Visual Studio?
It seems to be a background task that Visual Studio uses to Scaffold your code to ensure that the dots are connected when creating a data source.
The gist is that it runs through your code, checks objects for links to your data source, and sets up the settings you've added in the wizard.
In 'Data Source' window from where I can drag and drop data sources to a form, I can set the field to different control 'Textbox', 'Label', etc. But I used to be able to set them to some third party component (in this case Telerik's components). Just now I started to work on my project again, and these third party components do not appear there anymore.
I click on the choice list, customize ... I get the window 'Options' width 'Data UI customization' selected, there I used to be able to select Telerik's control, but again they don't appear there anymore.
How could I customize this ?
I ran into something similar back in December... apparently with some windows updated / service patches, it corrupted something. I couldn't even pick a UI control of my OWN. I even tried by creating a BRAND NEW project, created a single class and it would not appear in the toolbox to be put into a form anywhere.
By doing some digging, I came across a blog (don't remember where), but it directed me to do the following. Get to your Visual Studio Command Prompt. There should be one in your Startbar menus specifically under your Visual Studio icon group.
Once at the command prompt, do
DEVENV /setup
This apparently does some fresh "cleanup" settings and fixed whatever was stopping the classes from being displayed. As soon as I did, and re-started VS, the class libraries appears and able to be put into forms no problem.