Creating a desktop application to design Master Page? - c#

How would I go about creating a desktop application that would be capable of generating an ASP.NET master page, perhaps using drag and drop for the different allowed elements (image, text, video). I would take the co-ordinates and generate a master page that can be used later.
Any ideas would be great, I know the question is a bit strange and vague.

Well this is very strange of you to do this as there are already many tools to go about doing this.
Visual Studio (is itself Self Sufficient)
Expression Blend (if you need more control over Design)
Try them.
Still if you are keen about developing something that suits you custom needs then sure go ahead.
As the master page is similar to HTML DOM you can create tags and attributes according to the user's choice.
I suggest you take idea from Visual Studio Designer itself and develop something similar with room for your custom implementations. That way you customer's wouldn't have difficulty in switching to your Application.
As for HTML editing there are Various classes like HTML Element which you can use to create the DOM. Also try out some tools like HTML Agility Pack. Also search for some plug-ins that you can use for making things like HTML Editor. Some has been suggested in Jacob's answer.

It's unclear what you're looking for in an answer. There are several pieces to such a project. Here's what you'd have to create:
A text editor
An ASP.NET parser so that you can do syntax highlighting or WYSIWYG display
An assembly loader so you can detect which items to put in your toolbox
A drag & drop interface
An ASP.NET compiler so that you can test your work in a browser
You may want to look at existing frameworks as a starting point. Eclipse is an engine for building products like yours, so you could base your project in that framework. Scintilla is a popular library for writing text editors with syntax highlighting.

Related

Custom editing functionality for SharePoint web parts

I am trying to develop web parts with custom functionality for editing for normal users. In the chrome bar there would be the same sort of controls as you see in the top right of your browser (except with a triangle instead of a line).
Triangle is to minimise/restore (as in OOB, but with different display)
Square is to maximize a new module type window, probably with an iFrame displayed in a module type view window with jQuery with an additional field to add the url to where it should go
Cross is to delete web part
The functionality is required across a few different types of web parts including calendar, CBQ, Data View, CBQWP, and would ideally be a part of a custom chrome that would be added to them. I don't do back end code so I'm finding it hard to get my head around how someone would put together the functionality. Unless it's simple it won't be me writing this functionality. I have Enterprise 2010 for development, but the people using the control would only have foundation.
I'm basically after opinions about how this would be done. I think it should be a custom control written into the chrome, if that's possible. Does that seem feasible or is there a better way of doing it?
I would really appreciate any advise, even if it's just that it would be better to skin the existing chrome and leave the functionality as is. There's leeway with the functionality so at this stage it's deciding on how best to do it if it's possible or not too bother going down that route.
Thanks very much in advance!!

Is it possible to record and repeat user actions in WebBrowserControl (Windows Forms)?

I want to be able to use the .NET WebBrowserControl to record and repeat user actions to automate the collection and retrieval of text from web pages for a data extraction tool that I'm building, but am unsure about how to best approach this.
I specifically want to use the .NET WebBrowserControl as it can be embedded in a .NET form and also used within a server side process without a UI. I'm aware that there are other means of recording and repeating user actions such as Selenium, but for now I am interested in a solution around the web browser control (just to keep answers focused).
Actions to be recorded are those such as button clicks, drop down list selection, link clicks etc.
Potential solutions I have looked at so far:
(Please correct me if my notes based on brief evaluations are wrong)
iMacro (doesn't appear to have a component that can be used within a project, to record user actions, rather the GUI has to be used).
WaitN - Good for programmatic play back - but no recording facility that can be hooked up to the web browser control?
I'm presuming this is possible as services like Mozenda appear to make use of the WebBrowserControl, or some IE like version based on mshtml.dll.
Are there any other options I can look at?
Any insight would be appreciated.
yap, as in Mozenda ,when user create any action like goto mainpage>click on images>download image etc... the XPath is recorded with the each page url into XML file. So, use self learning algorithm to implement such kind of XML better way than mozenda.
i have developed one application using JSOUP and Regular Expression Parsing works same as mozenda do. i created the configuration file which contains the XPath of all the items you want . Which works great for me.
Hope this helps,

Components for WPF similar to the simplified Visual Studio

I would like to make a support plug-ins in my program.
For example in my program there are several tabs in one tab is the editor in which the code is written also in that tab has a button run.
After pressing the button run occurs a compilation of source code and its execution.
The results of work are displayed in the other tab.
I would like to find such a component in which there are:
Syntax Highlighting, Debugger, Analogue of solution explorer
Thank you very much for your answers.
I would like to bring more of clarity to my question.
I want to do something similar to that is shown in the screenshots below
On a single tab there is the editor and at the other tab displays the results.
To write plug-ins I'd like to use C #.
I guess the best place to start is AvalonDock from CodePlex, specifically what you are trying to do is a Tabbed User Interface.
Keep in mind that even with a TabbedWindows framework build/debug and syntax highlighting are not for free and you will have to find icons and design the UI mostly yourself.
for code coloring there are also many components, also free, like Scintilla .NET
You obviously understand that Visual Studio is a very complex application, so rewriting portions of it will be difficult. There are components available to help you, like the ICSharpCode text editor. In fact, that whole project is probably quite valuable.
However, when thinking of plugins and actually writing code for it, I'd personally go down the MEF route. In fact, this is the very framework that VS.NET 2010 uses for extensibility. Provide your user/developer with a set of libraries to code against (like an SDK), and let them use a Visual Studio Express edition to write proper code :)
As source code editor you can use AvalonEdit (it is great, in some aspects even better than VS code editor), solution explorer is fairly easy to create and debugger is way too language-specific to be a reusable component (you didn't specify what language are you developing for!).
The whole thing can be packaged into AvalonDock, so you get the draggable and dockable panels - it even has VS 2010-like skin (and again - is very easy to implement even with only very basic WPF knowledge).
Or you can use the Visual Studio Isolated Shell - it allows you to use the Visual Studio interface in your program (the end users don't have to have VS installed!), but it requires extensive knowledge of VS API (if you ever developed VS extension you know what I am talking about). For example Civilization V used this approach for it's modding environment, but the result smells as stripped VS with custom splash screen, not as professional product. There are many buttons and config. options that don't work, some features that would be expected from such program (and easy to do in custom app) didn't get in because it would be nigh impossible to implant them into the VSIS etc...
EDIT: You may also eventually be interested in this.

C# web forms api to dynamically create forms

I am working on an asp.net project which has numerous form screens. All our forms are pretty much using a given set layout which needs to be made by developers ond an on again.
Our current implementation requires that for every form control, a developers needs to write inside in the .aspx file the HTML of our forms (whilst embedding our field controls in them).
As a result, we have our project's HTML code scattered in many, many controls all over the place. It is highly possible that we change the HTML of our forms in the future.
Does asp.net C# have anything similar to Drupal's Form API which allows developers to simply create their forms programatically using a "Form Control" of some sort? The developer would add 'rows' with different field controls in them. It is then upto the 'Form Control' to generate the HTML structure of the form in the end.
Using such a method should give me the following benefits:
HTML is all in one place - making it easy to change and even skin differently
Developers who are not HTML+CSS savvy do not need to tinker out of their comfort zone
Fast development of new forms
I had a look online and it looks to me that maybe what I am after is a Hybrid Table Control that is modified to generate Div's (and not necessarily table tags).
Any ideas?
I would:
create a master page for the whole web application
create a nested master page for the pages where these data controls appear
put all necessary CSS, html etc in these master pages
create a 'template control' for developers to follow, where they just need to drop items onto a new control.

What's the best way to integrate Designers using Dreamweaver with Visual Studio C# developers?

I know about code-behind files, but what is the best real-world way of Designers that are using DreamWeaver or other Design Tools to work with Visual Studio programmers?
For example, say you have a basic website with user interface forms hitting the database... the database work is definitely done by the developer but how to tie the designed forms with the database coding or client-side logic that may involve events on controls, or other GUI related tie-ins. Are the graphic designers also controlling application flow? There seems to be a large disconnect that needs addressed - especially when it comes time to tweak the design after it's been implemented.
Use another approach like MVC, separate your design from your logic. Like this every member (designer / developer) of the team can focus on what they do best.
MVC implementations: link / link
The best way is to make sure that your designers have some knowledge of what kind of HTML they will be working with.
Every ASP.NET developer is aware of MS-HTML, that lovely nesting of HTML tables, but designers aren't. Designers have their own requirements to meet and they'll do them in the best manner possible. Sadly it's not often good for us.
I am always frustrated when I receive a design from our UI team which shows radio-buttons nicely layed out in a grid using floating div's. Then I have to shatter their dreams that no, I can't generate you that HTML (ok, I can with the use of ControlAdapters, but every time they are different designs!).
Try and have a 90%/ 10% rule, where 90% of the design is done before the ASP.NET starts and the 10% is done once the ASP.NET is completed, and done against ASP.NET generated HTML.
And make sure you're using source control! Code doesn't exist unless it's in source control! And thanks to the latest TFS PowerTools there's a lovely Windows Shell integration component so you don't need to use VS to check in and out now more :D
This may sound really cheezy, but when I was working with Dreamweaver / Visual Studio, I'd do my layouts, and then conveniently put [RADIO BUTTON HERE], [INPUT TEXT HERE], etc. in the places where my form elements/controls would go, and I'd save the page as a basic HTML document.
That way Dreamweaver wouldn't nest its own form tags in and I'd have easy to locate places to drop in my ASP.NET controls when I went to merge things in. It was easy enough to create a fresh web form page in Visual Studio and then copy and paste everything over. If for some reason I mucked things up, I'd have a basic HTML "template" to start over wtih.
Unfortunately this is an all too common problem. Dreamweaver typically doesn't write html that is friendly to a .net developer. If at all possible, get someone who can actually read, and write HTML,not just use the Dreamweaver WYSIWYG editor.
I often found that if I'm working with a designer that doesn't know html, that I actually save a lot of time be just having them mock up everything in photoshop, then give me sliced up images. I find that my writing the actual HTML in a .net friendly format saves a ton of time, instead of having to go back and forth with the designer in this situation.

Categories

Resources