I am trying to implement web browser according to this article from msdn.
http://code.msdn.microsoft.com/vstudio/Professional-WebBrowser-dac9c5d0#content
But I have trouble with point 4.2 Adding The NuGet features. I successfully installed the DockPanel Suite via Manage NuGet Packages. This application is WinForms in Visual Studio 2012. After this instalation I should see the DockPanel component in toolbox, but I cannot find it. I tryed everything but still nothing.
What you need to do is:
Open Solution Explorer.
Open the References folder of your project.
Find the reference named 'WeifenLuo.WinFormsUI.Docking'.
Right-click the reference, and then click Properties.
In the Properties window, find the Path item.
Double-click the value of the Path property in order to do a 'Select All,' on it, and then do a Copy to the clipboard.
Right-click the Toolbox, and then choose Choose Items from the menu.
Click Browse on the .NET Components tab.
Paste the path in the Browse dialog box's File name field, and then click Open.
A new checked item, DockPanel, should be visible in the list. Ensure that the check box next to it is checked, and then click OK.
After following these directions, then a DockPanel item should be visible, and you can just drag it to the Designer.
Please note, these directions are for Microsoft Visual Studio 2010 Premium.
Related
In my winforms application, I used WebBrowser class which is using IE browser. I want to update it into WebView class so that I can use Edge browser. That's why I installed packages Microsoft.Toolkit.Forms.UI.Controls.WebView. Then I changed some existing code which is compatible with WebView. But when I ran the project, I found the below errors after installing that package.
The item "C:\Projects\windows-v2\packages\System.Runtime.WindowsRuntime.4.6.0\build\net461....\ref\netstandard2.0\System.Runtime.WindowsRuntime.dll" in item list "ReferencePath" does not define a value for metadata "CopyLocal". In order to use this metadata, either qualify it by specifying %(ReferencePath.CopyLocal), or ensure that all items in this list define a value for this metadata.
I found the solution and I am answering my own question. If anyone will face same problem then it will help.
The problem is not in the code. It is a problem in visual studio upgrading problem. Previously the project was in VS 2015 version but when I upgraded the webView, I used VS 2017 version. This is the reason to show the error "ReferencePath" does not define a value for metadata "CopyLocal".
To solve this problem go to the following directory:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin
and open Microsoft.Common.CurrentVersion.targets file.
Then at Line 3961 change this ...Include="#(ReferencePath)" into ...Include="#(ReferencePath.CopyLocal)"
To use a WebViewCompatible control in a Windows Forms application:
Install package Microsoft.Toolkit.Forms.UI.Controls.WebView
Right click on an empty area in Toolbox → select Choose Items → From the Choose Toolbox Items → choose .NET Framework Component tab → Click on Browse → Browse the package folder and choose Microsoft.Toolkit.Forms.UI.Controls.WebView dll → Click Open → Click OK
Drop an instance of WebViewCompatible control on the form.
In the Load event or in constructor after InitializeComponent add code to navigate to the address you want:
webViewCompatible1.Navigate("https://www.google.com");
I want to add my custom control into the VS Toolbox. But I need it to appear in toolbox always when a new project is open. How can I do that?
Create a VSIX package to install the control
You can create a VSIX package to distribute and install user controls to toolbox.
To do so, you can create a VSIX Project and add a Windows Forms ToolBox Control to the project. The control is decorated with a ProvideToolboxControl attribute which determines the tab that the control will appear in. You can pass an existing or a new tab name to the attribute:
[ProvideToolboxControl("Some Tab Name", false)]
public partial class ToolboxControl1 : UserControl
You can also fill the information in .vsixmanifest file. Then when you build the project, it creates a .vsix package file in \bin\debug folder of the project which you can distribute this file. If you run the file, it installs the control in visual studio toolbox.
More information:
Walkthrough: Creating a Windows Forms Toolbox Control
Note:
VS 2013 has a Windows Forms ToolBox Control Project Template under extensibility group of new project window and you can use it to create the project. Starting from VS 2015 you should use VSIX Project template.
Manually Add Control to Toolbox
You can copy the dll of your control to a permanent location. Then right click on ToolBox, for example on general tab, then click Choose Items ... then in Choose Toolbox Items window in .Net Framework Components Tab, click Browse... button and open the dll of your control. Then in the components list, check the control and click OK button. The control will appear under the selected tab. You also can add your own tab simply by right click and choose Add Tab.
I have a solution in Visual Studio 2005. I need to change its source control binding from one branch in Visual SourceSafe to another through automation by C# code. I would like to know if there are any APIs to do this.
To bind version controlled projects and solutions to Visual Studio
Highlight the project or solution you wish to bind to Team Foundation version control in Solution Explorer.
On the File menu, click Source Control, and then click Change Source Control.
In Change Source Control dialog box, click Bind.
To unbind version controlled projects and solutions to Visual Studio
Highlight the project or solution you wish to unbind in Team Foundation version control in Solution Explorer.
On the File menu, click Source Control, and then click Change Source Control.
In the Change Source Control dialog box, highlight the solution or project you wish to unbind from version control, and in the toolbar, click Unbind.
It does not seem that there are any official API's that can do this, however Saveen Reddy has uploaded a tool that I have not tested onto codeplex and says it works. Here is the link: Saveen Reddy's blog
I would like to find out if you used it how it went?
I entered in work with Telerik RadControls. In web.config telerik set in many places. But can anyone give me algorithm how in new project asp.net (web application) in Visual Studio 2010 add dll? (dll library I have)
If you want to add the items to the toolbox so you can do Drag And Drop, do this:
1). Open Visual Studio
2). Open a new project (or existing)
3). Find your "toolbar" window in VS.
4). Right click in the tool bar white space (somewhere where there are no existing controls)
5). Click "Add Tab"
6). Name this tab "Telerik"
7). Now, right click again, and hit "Choose items"
8). A Window will pop open, you can select your Telerik DLL, and it will fill the tool box with
all the controls you need.
You can then Drag and Drop these controls to your pages.
I hope this helps.
If you have Telerik installed on your Visual Studio machine, but it is not currently part of your project, the easiest way to add the proper Telerik DLLs and web.config entries would be to go to the Telerik menu at the top of your Visual Studio, and select Convert to Telerik Web Site.
You can try with this article
http://www.telerik.com/products/aspnet-ajax/resources/step-by-step.aspx
I want use the Scintilla controls and the RadControls for Winforms, but I do not know how to incorporate the files. They are in .dll format? How do I use the controls if they are in .dll format?
http://msdn.microsoft.com/en-us/library/wkze6zky%28VS.80%29.aspx
Right click the project, click Add Reference, go to Browse tab, find them and add them.
Generally you would add them to the project you want to use them in, then add a reference, and then use them like any other dll.
For installing into the GAC, see this.
In the winforms toolbox, right click and "Choose Items...", then click the browse button and find the dll. Then go through the list of controls, and check the controls that you've added (usually it will do this step for you).
This knowledge base article on the Telerik website explains how to manually add the controls to the toolbox in Visual Studio.