Cefsharp Visual Studio Get Link Url - visual-studio

I am building a web browser with visual studio cefsharp. I have been struggling to find a way to find the url of a specific link (on an action like right-click or mouseover). In other words, when I right-click a link, I would like to store the url in a variable. I found this: http://magpcss.org/ceforum/viewtopic.php?f=17&t=12635
Which I believe would solve my problem but am not sure how to use it. If anyone could explain this link or suggest a new solution, I would appreciate it.
Thank you.

I'm using CEF, not CefSharp. So I'll try to guess how it is going to work in CefSharp. When you right click anything in the browser the context menu shows up. There is a way to create a custom handler for the context menu. This tutorial has some details.
The 4th parameter of OnBeforeContextMenu is IContextMenuParams. If I understand your question correctly you are looking for LinkUrl property.

Related

Is there an XML doc view in Visual Studio similar to the JavaDoc view in Eclipse?

In Eclipse, there's a JavaDoc View which would display the JavaDoc of whatever the current or last selected element was. I'm trying to find something similar for C# in Visual Studio 2013, but I'm not seeing anything like is. Does it exist? If so how do I activate it?
Thanks!
There are many applications that can generate MSDN style documentation from your XML comments. Here are a few I have used and they work well
VSdocman:
http://www.helixoft.com/vsdocman/overview.html
SandCastle
http://sandcastle.codeplex.com
I found what I was looking for. In Visual Studio, one would use the "Object Browser" to get something similar to the JavaDoc view. To get to it, View->Object Browser.
It does behave differently than Eclipse's JavaDoc view. Rather than tying the documentation to the cursor in the edit view, the Object Browser has a search box where one could search for the object they wish to view documentation on.

VSCommands Solution Badges parameters

does anyone know what are the various parameters for VSCommands's Solution Badges feature? On the official site http://vscommands.squaredinfinity.com/Features-SolutionBadges they tell you everything BUT the most important thing and that is the list of available parameters (ie. {solutionFileName}, {sln:activeConfig}, {branchDirectoryName} and so on). Can't seem to be able to google them either. Am I missing something obvious here?
So it seems that pretty much all available parameters are already displayed with the default configuration (had to decompile and deobfuscate the extension to find out this information). What I was after was full solution path in the window's title bar. I solved the problem with this handy extension
Visual Studio Window Title Changer.

mvc html.serialize to store model in view

Can anyone tell me what happened to the Html.Serialize function mentioned in the url below.
It's not recognized when I try and use it in a MVC2 web app within Visual Studio 2010.
http://weblogs.asp.net/shijuvarghese/archive/2010/03/06/persisting-model-state-in-asp-net-mvc-using-html-serialize.aspx
EDIT - I'm using visual studio 2010 which comes with mvc2 'built in' when i try and use Html.serialize on a view or partial view it's not appearing in intellisense. Am i missing a reference or something?
It hasn't gone anywhere. It is right there, wherever you are able to use the html extensions. Eg, Views, PartialViews.
For example:
<%= Html.Serialize("wizardData", Model)%>
Are you trying to use it in a controller? To use it as shown in the article you quote, you need to use it in a view.
You see, we really don't know because you haven't given us any detail to work with. Show us some code, and we will move your earth. Well, try to anyway.
I see you are new, so when asking questions, try to give as much detail as possible. You can edit your post, just mark out what you have done. The more context we get, the more we can help.
I found out why! I was having similar problems too.
You need to download ASP.NET 2 Futures and use the DLLs provided there instead of the usual Mvc DLL.
It is implemented in SerializationExtensions class.
It's in the MVCFutures assembly and not part of the out the box MVC framework. You will need to add the package via nuget or manual download and then add a using/imports statement to Microsoft.Web.Mvc before you can use it in your view.

How can I add a Window to my Visual Studio?

I created an Add-in project and now I have this in my solution explorer:
Do I just add right click the solution and add a Windows form? I'm not sure how this works and the tutorials I find don't touch on this.
Thanks.
You can right click the project file under the solution file and select add new item. Btw it looks like you have a missing reference for "Microsoft.CSharp though; that will need to be resolved or removed from your project.
Here is how you instantiate a form and show it in the most basic sense.
Form f = new Form();
f.Show();
Hope this helps.
Enjoy!

How do I write a custom start page for VS 2008?

I've looked around, and not found much documentation on this, so I thought I'd ask where all the experts hang out.
I would like to create a new start page, with bug tracking and source control interfaces, rather than the standard MSDN feed. I seem to remember that one can do more than just supply a different URL, but can actually implement a component to run as the start page, which needn't use web content. I may be wrong. Can anyone please give me some tips?
You can do is to create a DTE ToolWindow (read: Creating a ToolWindow hosting a .NET user control) and host your controls there, then its pretty easy to create an addin that will show the tool window as a document at runtime. (The same way that the start-up page looks)
Go to Tools > Options > Environment > Startup and put your RSS URL in the Start Page news channel field.
That should give you enough, but if you want to do more you can select open home page in the at startup dropdown and point it at a URL with the appropriate content. If you use an intranet with Windows authentication you could display user specific stuff.
This will be completely customizable in VS 2010. You'll be able to do anything you want to on the start page.

Resources