Quick way to integrate Xaml in asp.net? - c#

I have a WPF/C# application.
It contains some .XAML pages.
i would like to integrate this application into my ASP.NET/C# web application.
I want the application to show in an asp.net page.
What is the best way to do this?
I heard that I can use Silverlight.
I never worked with silverlight before. Can I do it without knowing silverlight or should I have a knowledge in silverlight before doing it?
Any help is greatly appreciated.
Thank you very much

You can either deploy your WPF application as an XBAP or migrate it to Silverlight. I'd recommend the latter because you'll get better browser/os support.
Just create a new Silverlight project and copy your xaml files into it. Probably, everything will be compatible since both frameworks have a lot in common. Silverlight is a bit more restrictive since it's a web framework, but it also has other features that WPF doesn't. If you find something that's not compatible, just search for an alternative here.

Related

Whether to choose WPF(browser application) or Silverlight

I dig into the WPF(browser app) and Silverlight application environment to know which one is best suitable for web development. I search out many portals saying that WPF is good for window forms and Silverlight for web. I also tested my WPF web app on different browsers and faced thousands of browser plugins issues except IE browser. As I come to know Silverlight is sub party of WPF which means SL has less features as compare to WPF. Now I want to figure out which practice is best suitable for web development and why?????
Thanks in advance
Silverlight is being discontinued, so don't use it for anything important. Use WPF if you want that kind of display tech, or Metro w/C# or Javascript

How to use WPF user control in ASP.net

I have developed a WPF user control and I want to use it in ASP.net.
You can't. ASP.NET and WPF are completely different technologies. Best you could do is provide an XBAP application from your ASP.NET application, which is downloaded and run client side as a WPF application. Even if you convert it to Silverlight, it's still running client-side, with the advantage that Silverlight is a lighter runtime and is available on some non-Windows platforms.
You cannot use it directly.
You can either create an XBAP or you convert the control to Silverlight.
You probably can if you use it in Silverlight.
simply make a little "Silverlight" application and explicitly place on your ASP page. probably you can't do in placing wpf in ASP because the compiler is not teach to read Xbap with knowledge base (extension) of ASP XD

How To Get Started With Silverlight?

I want to start silverlight development inside an application which developed by WPF.
Actually we want to add silverlight featuretoan existing WPF project. what should we consider and how todo this
I saw Getting started with Silverlight development and it was not my answer
I mark this as a Community Wiki.
Please clarify your intent. What do you mean by a Silverlight feature ?
Silverlight is a subset of WPF, but is intended for a Web application (i.e. running inside a Web browser, using the .NET framework provided by the browser plug-in), while WPF is meant for a desktop application (i.e. running outside of a browser, using the full .NET present on the disk).
(there is the notion of running WPF inside the browser, but that is still using the full .NET framework).
"Adding" Silverlight to WPF doesn't make much sense because you can accomplish whatever you need to do in regular WPF for the most part. If you already have a WPF application you are enforcing windows and the full .NET client run time so you are going to get any deployment benefits.
I assume what you may be considering (since you mentioned XBAP) is to re-write or recompile your current WPF XBAP application into a Silverlight application? This way you get cross platform web deployment with the full Client run time requirement.
If this is the case then you would not be "adding" to your existing solution. It would be more an exercise in porting the existing application over to Silverlight. With SL3 this is less painful then before (and if SL 4 is an option it will be an even better experience).
My first step would be to simply create a new Silverlight application and begin moving your code over and seeing how far you get.

Building your own web controls

Well it's kind of a newbie question but I think lots of people have problems with this.
I'm developing Windows/web application for fun, and installing them at friends' places. Most of my developing concentrates on the CRM system, but I have a big problem with showing data from DB in better, more effective and lighter ways.
Using Microsoft built-in web controls is a nice and easy way, but it doesn't answer my needs, and worse, it's not that effective as other web controls in great software and websites(Google(lol)).
I want to build my own controls(GridView, etc...). So my question is how can I do this myself?
How does Microsoft build their web controls for both web and Windows Form developing?
Thanks!
Amit
Here's the starting place for learning about creating your own web controls.
http://msdn.microsoft.com/en-us/library/bb386565.aspx
And here's an older reference, but probably a better place to start.
http://msdn.microsoft.com/en-us/library/aa710843(VS.71).aspx
And finally.... If you want to develop custom controls for Windows Forms applications...
http://msdn.microsoft.com/en-us/library/6hws6h2t.aspx
Well, this can be answered several ways. Most of the nice controls are doing a lot of Javascript that is not obvious unless you look at the output. You might be interested in using JQuery plugins (or "controls"). Also, to be honest, you might be interested in persuing a new way of doing ASP.NET, which is called ASP.NET MVC. This is a very good way forward of building Web applications that utilize a lot of Web standard technologies without hiding and obscuring the details. Here's a link to that:
http://www.asp.net/mvc/

Web Application, which route to go?

I'm going to develop a web application based on mathematics. It's going to provide stuff like canvas' showing graphs (quadratics etc.) and also provide an exercise area to test knowledge.
I am stuck as to which route to take. I haven't developed a Web Application before and I am most confident working in C# applications. I would prefer to use C# when creating this but I don't know if that is really appropriate.
I have the following routes that I could go down:
Silverlight - I haven't used this before but it seems to be the most obvious solution to me. I was wondering how hard it will be to develop an understanding of silverlight (xaml etc.)
Java, I haven't any idea about java, but I've heard it has a lot of similarities to C#.
Tclets, my university tutor said he has worked with this before and it's easier to get on the web, and very handy for gui's.
I thought I'd ask this here to get everyones opinion on which path to take, and sum up all the positives and negatives of each route.
Thanks in advance.
If you decide to go the Silverlight route the Silverlight Toolkit has some good graphing samples : Silverlight Toolkit Control Samples - which is itself a Silverlight application.
Using Silverlight is probably the closest you can get to writing a desktop application for the web. The UI is specified in XAML with the application layer in C#. The whole application sits within the Silverlight control and you can generate the menus and other navigation items you need.
It complies to a XAP file which you deploy and then reference from either an HTML page or ASP page.
If you are most comfortable with C# then I would advise developing it in ASP.NET. Heres a starting point: Creating ASP.NET Web Applications
I really can't speak to Java or Tclets but Silverlight will offer you a familiar programming model if you are most comfortable in C#. XAML requires a bit of a learning curve if you don't have any experience with it. You don't have to go 100% Silverlight though - it could be a hybrid HTML (ASP.NET) and Silverlight solution - where Silverlight could primarily be used for the graphing/charting. You could use HTML or a more sophisticated ASP.NET site for the remainder of the content.

Categories