We are currently developing a web application in ASP.NET MVC which would really benefit from a IDE of sometype to help allow some elements to be visually customised.
Could anyone recommend an approach ? We are thinking of maybe a plugin using Silverlight.
Does anyone have any links or examples that might help ?
Well, Visual Studio 2010 is built using WPF - Jason Zander's WebLog
At the PDC and TechEd EMEA last year we described our new editor support built on the WPF technology in .NET Framework 4.0. Today I’m happy to reveal the new UI for Visual Studio, also built on WPF:
Expression Blend is almost entirely written in C#/WPF.
There is also at least one text editor component under development (not sure if it is already available) from a commercial third party, Actipro, which is supposedly going to be available in Silverlight and WPF versions.
From your description of what you need, you seem to be looking more for examples or code for writing a full-blown design surface yourself. I am not aware of a suitable library for that.
There was a company in Canada that made a design surface toolkit for WPF, but I can't recall its name right now. I also believe the component is not available any longer.
There is an opensource C# IDE that was developed using C# - SharpDevelop. I believe this was developed back when .Net 1.x was the new hotness, so I don't believe it uses WPF or Silverlight.
In addition the MonoDevelop IDE is also built in C# and GTK#, originally based on SharpDevelop.
Related
System.Console.WriteLine("Hello StackOverflow folks!");
I would like to know how to hard-code a text editor using either the language I just used or Visual Basic, utilizing the Visual Studio IDE. I know there is a GUI designer but I am using a screen reader for the blind, so dragging and dropping controls is not an easy task. I have looked for this on the Internet, narrowing down my search to my situation but I cannot find anything. Would you guys be so kind and help me find a tutorial about hard-coding a text editor?
I would really appreciate it!
Thanks,
Kevin
I'll tell you up front: I have no experience with using a screen reader. But I do know that I program without ever using the GUI designer in Visual Studio. It is easier if you use Visual Studio 2008, 2010, or the newest 2012 Release Candidate (currently a free download, with conditions). If you use those IDEs, you can use the Windows Presentation Foundation Platform, which gains you access to XAML. This markup language will allow you to create rich GUIs without the need for drag and drop. True, you can create Windows Forms applications in pure code-behind (using C# or Visual Basic), but that would be a pain. Here are some basic tutorials for XAML and WPF programming:
http://wpftutorial.net/XAML.html
http://visualbasic.about.com/od/usingvbnet/a/wpfintro.htm (Visual Basic)
need XAML tutorial (A question that has answers with plenty of tutorials)
I wish you the best!
I have created a C# application with 50 forms.
Unfortunately Mono (Mac OS version) doesn't work with standard window winform.
I don't know why, but I this moment I need to solve the problem.
The only solution seem convert winform to GTK#, but I don't have any experience on GTK#.
My questions are:
How hard is convert my 50 forms to GTK# ?
What I need to do exactly ?
This is an easy solution ? Or I need to re-write my application ?
Apart this I don't know where I can found/use an Visual IDE to do a design modification like Visual Studio IDE.
GTK is a pretty good framework, on both windows and linux, GTK# is very easy to write by hand or to design using monodevelop. So it is worth a shot if you are curious, GTK# apps are generally easier to find help for ( the GTK+ docs are helpful )
The nicest thing about GTK# is the automatic layouts, no more crazy panel placement or absolute positioning like in winforms.
I am curious though why your winforms app isn't working, Mono's winforms support is pretty good and very near exactly matching .Net. What errors do you have?
The issue I had with Winforms at Mono was that in the files "xyz.designer.cs" there is often a code:
((System.ComponentModel.ISupportInitialize)(xyz)).BeginInit();
and
((System.ComponentModel.ISupportInitialize)(xyz)).EndInit();
looks like Mono does not accept this code.
My impression is that this code could be deleted from most of the windows forms. But I am not really sure.
For sure the "xyz.designer.cs" file cannot be modified under Visual studio since this code is automatically created by the GUI designer.
But you could modify these files under Monodevelop.
Looks like you would need to manually update 50 files.
the core part of the bachelor thesis which I am writing right now is a plugin for a C# IDE that offers a few refactorings (it comes to more than simple refactorings but I want to keep it simple for the moment).
I've always been working with Visual Studio so far. However, I've heard that their AST access is rather uncomfortable.
Alternatives are MonoDevelop and SharpDevelop. Another way to work with Visual Studios AST would be to access it via a custom ReSharper Plugin.
Does anyone of you have experience in writing Plugins for any of those target applications? What do you think? I appreciate every advice and disadvice.
Thanks,
TH
An advantage of using MonoDevelop or SharpDevelop is that they're open-source, so you can be sure to have full access to the AST - you can go into the core and modify things, if necessary. Another advantage is that they're 100% managed code, so much easier to develop and debug. Plus, you're more likely to be able to get hold of core developers and ask them detailed questions.
If you're interested if working with MonoDevelop, I'd recommend you implement your refactoring directly in the existing Refactoring addin. We'd love to have more refactoring features :)
The codebase has been undergoing a bit of churn in master because we switched to a new AST and a parser based on the Mono C# parser, and the refactorings have not yet been ported over. I'd recommend you head over to our mailing list or IRC and ask some more specific questions there, so we can give you some more specific pointers.
I believe VS 2010 has very good native support for plugins using MEF. Here's a guide:
http://msdn.microsoft.com/en-us/library/dd885242.aspx
You can also use Devexpress DXCore, it's free with CodeRush Express.
The best AST access for refactorings is offered by NRefactory 5, a complete rewrite of the previous NRefactory version (which is used in both SharpDevelop and MonoDevelop).
For SharpDevelop we plan to use the new NRefactory in SharpDevelop 5.0; and MonoDevelop will also migrate to it eventually (MonoDevelop is already using the new AST, but not yet the new type system/semantic analysis).
The main goal for this rewrite was to:
Provide a rich AST with position information for every token, making refactorings easier to write
Improve the semantic analysis performance
Eliminate some bad design decisions from the previous version (IExpressionFinder, and how referenced assemblies are handled)
In the future, you might also want to look at Microsoft's Compiler-As-A-Service.
Also be sure to checkout ReSharper from http://www.jetbrains.com/resharper which is a plug-in for VS that adds many refactorings
Hey guys I'm a newbie and I just wanted to know of the people who do Winforms on Visual studio, at your place of work do your forms have IDE support. Because for some reason I don't have IDE support on 99% of the windows forms I'm working with. I mean I can not see anything on the design view except for errors is this the usual case in industry????
Are you using any 3rd party UI controls? Some have dll's for the design view to work, and if you haven't installed the toolkit on your developer machine you might get errors like this.
One possible explanation for having errors on forms is licensing. If your company uses third-party controls on their forms, they could cause errors when trying to display the forms on unlicensed machines.
Another possible explanation for errors with third-party controls is simply installation. If you don't have the controls installed and referenced properly, that could also cause errors.
You could try to post some of the errors you have to another Stack Overflow question, and perhaps the community could help you solve your errors.
Sorry, WinForms is not broken for us (me). Check your code. Sometimes WinForms applications that were developed under Visual Sudio 2003 (or earlier) when upgraded to Visual Studio 2005 (or later) become unstable.
Start with a new form, and if the IDE (it is called a visual designer) works fine, then think about re-creating the old forms from scratch with the newest VS installation.
Your question isn't clear!, if the Visual Studio Designer not working well then re-install the IDE
Or explain more...
You should be able to view the forms in the design view.
Always unless there is an error in code. In case the project is building you should get the same error (this is a runtime error) that you will generally get when you run the code.
In case the project is not building it will be simpler to fix the errors :)
During the last 10 minutes of Ander's talk The Future of C# he demonstrates a really cool C# Read-Eval-Print loop which would be a tremendous help in learning the language.
Several .NET4 related downloads are already available: Visual Studio 2010 and .NET Framework 4.0 CTP, Visual Studio 2010 and .NET Framework 4 Training Kit. Do you know what happened to this REPL? Is it somewhere hidden among examples?
I know about mono repl. Please, no alternative solutions.
The REPL demo was part of "what might happen next", i.e. after 4.0; in .NET 5.0 or something similar.
This is not 4.0 functionality, and never has been.
It's probably worth mentioning that the Mono project already does have a C# REPL which i tend to use for those small checks you do now and then. Take a look. Also, if I'm testing an idea which I'm uncomfortable Mono is going to handle to well and it's not worth starting a new test project then Snippet Compiler always comes in handy.
The Immediate window (Debug>Windows>Immediate Ctrl+D, I ) is fairly good replacement that's built in. It does require you start the IDE and put a breakpoint on something.
It does give you the context of where you would like to do experimentation.
Marc's answer is entirely correct, the possibility of a repl or script like c# has been discussed by Eric Lippert in two blog posts:
Why doesn't c# implement top level methods
It already is a scripting language
I would add that, the 2010 CTP does contain an f# repl (not much use for c# but if you were interested in some aspect of the BCL or CLR then it might be sufficient for your needs)
I find that LINQPad makes up for the lack of a REPL in many cases. It would be nice to get it integrated into Visual studio so you could interact with your existing code base more easily though.
Take a look at this C# REPL Script Environment which is a great way to quickly run C# script (and learn how to code)
I just published a VisualStudio Extension that provides a REPL environment inside VisualStudio (namely a C# REPL Environment with a Fluent API for .NET and VisualStudio)
In addition to being able to write and execute quick C# snippets (in a REPL environment), you can program VisualStudio IDE in real time!
You can install it using VisualStudio's Extension Manager (search for C# REPL) or via the download link at the VisualStudio Gallery page: VisualStudio C# REPL
The VisualStudio C# REPL page also contains more details and code samples.
There is also an Reddit thread on this extension (which contains more code samples).
Let me know what you think of it
Command-line REPL
To play with the C# REPL outside of Visual Studio, open the Developer Command Prompt for VS2015 and type the command csi to begin your interactive session. Here is a list of arguments that can be passed to csi.
Note: csi stands for "CSharp Interactive"
You can also open an interactive window directly from Visual Studio by navigating to View > Other Windows > C# Interactive.
Check out the Roslyn Wiki on the C# Interactive Window.
I found http://kamimucode.com/Home.aspx/C-sharp-REPL/1 . Which seems to be pretty good and I believe also exposes an API to evaluate expressions dynamically
To update on this old question c# REPL is now available as part of Visual studio IDE (starting VS 2015 update 1).
Introducing the Visual Studio 'C# REPL'
From time to time I want to try out some .NET API instead of wondering about C# language syntax. (There are far more subtleties in API than in the language itself.) If you are only looking for REPL for .NET, good old PowerShell is always with you.
C#:
using System;
using System.Text;
Convert.ToBase64String(Encoding.UTF8.GetBytes("Overflow"));
PowerShell:
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("Overflow"))