<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.windowsclient.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">The XAML Box</title><subtitle type="html">A Windows Presentation Foundation Blog</subtitle><id>http://blogs.windowsclient.net/ddelimarsky/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.windowsclient.net/ddelimarsky/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.windowsclient.net/ddelimarsky/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20423.869">Community Server</generator><updated>2009-09-11T14:03:00Z</updated><entry><title>Developing WPF Browser Applications Online</title><link rel="alternate" type="text/html" href="http://blogs.windowsclient.net/ddelimarsky/archive/2009/09/13/developing-wpf-browser-applications-online.aspx" /><id>http://blogs.windowsclient.net/ddelimarsky/archive/2009/09/13/developing-wpf-browser-applications-online.aspx</id><published>2009-09-13T15:23:00Z</published><updated>2009-09-13T15:23:00Z</updated><content type="html">&lt;p&gt;If you ever wondered if it is possible to develop WPF applications online, then the answer is yes. I recently stumbled upon a tool, called CodeRun. It is an online IDE that allows the developer to create various types of applications online, directly from the web browser, without the need to install any additional plug-ins or applications. One of the features of this tool is the possibility to create Windows Presentation Foundation applications. To be specific, it allows the developer to work on WPF Browser Applications (since it would not be possible at this time to run a client application).&lt;/p&gt;
&lt;p&gt;The UI of the tool is fairly easy, and if you are familiar with Visual Studio, you won&amp;#39;t find any trouble adapting to it. When you start it, you will see this UI:&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:893px;HEIGHT:719px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/coderun.png" width="1274" height="905" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I did not sign up for the service since the feature set provided without signing up is enough to get familiar with the WPF development capabilities using CodeRun. I am going to show you how it all works in the context of a generic WPF application. I will start creating the application in Visual Studio and will transfer the code to CodeRun.&lt;/p&gt;
&lt;p&gt;Although CodeRun has many great features, it also has some drawbacks. First of all - no support for IntelliSense. So if you are used to type quickly and half way through the word select the appreopriate choice from the IntelliSense list, you won&amp;#39;t be able to do this in CodeRun. Also, the debug/build performance isn&amp;#39;t the same as in Visual Studio. It took me something like 20 seconds to&amp;nbsp;build&amp;nbsp;a blank WPF page. Also, at this moment CodeRun is lacking many features a client IDE (like Visual Studio) has to offer (like unit tests, plug-in support, various build/debug options etc.) I would call it an experimental model of an online IDE, but the whole concept and the development platform goes is very promising.&lt;/p&gt;
&lt;p&gt;I created a simple WPF Browser Application using the &lt;strong&gt;File &amp;gt; New Project&lt;/strong&gt;. The &lt;strong&gt;New Project &lt;/strong&gt;window is very similar to the one of Visual Studio, so I just selected &lt;strong&gt;C#&lt;/strong&gt;&amp;nbsp; and then &lt;strong&gt;WPF Browser Application&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:963px;HEIGHT:791px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/coderun_np.png" width="1275" height="904" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Same as in Visual Studio, there is auto-generated code, so you won&amp;#39;t really have to build the page from scratch:&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:972px;HEIGHT:825px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/coderun_code.png" width="1273" height="906" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Another thing that is not yet implemented in CodeRun is a visual designer, so you have to do all in XAML/C# code, therefore you need to be quite familiar on how to work directly with XAML rather than just dragging and dropping controls on the page/window.&lt;/p&gt;
&lt;p&gt;You can enter the code directly in the code window or&amp;nbsp;upload a file from the computer (just right click the project name in the &lt;strong&gt;Solution&lt;/strong&gt; window and select &lt;strong&gt;Add &amp;gt; File From My Computer&lt;/strong&gt;) that contains code (for example, a &lt;strong&gt;.CS &lt;/strong&gt;file). The performance of the code window also is a bit different compared to Visual Studio (expecially when it comes to syntax highlighting), but it is acceptable for development.&lt;/p&gt;
&lt;p&gt;I created a sample application in Visual Studio that implements a generic button, progress bar and a text box on the page. Just like this:&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:981px;HEIGHT:883px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/vs.png" width="1280" height="1024" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I created an event handler for the button, so that with every button click, the progress bar value increments by 5. This is done quite easy:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; button1_Click(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;RoutedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (progressBar1.Value != 100)&lt;br /&gt;progressBar1.Value += 5;&lt;br /&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;The XAML code for the grid looks like this:&lt;/p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Grid&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Height&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;23&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; HorizontalAlignment&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Left&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Margin&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;12,14,0,0&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Name&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;button1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; VerticalAlignment&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Top&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Width&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;75&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Click&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;button1_Click&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;ProgressBar&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Height&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;26&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Margin&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;97,12,12,0&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Name&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;progressBar1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; VerticalAlignment&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Top&amp;quot; /&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;TextBox&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Margin&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;10,63,12,12&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt; Name&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;textBox1&amp;quot; /&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Grid&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#ffffff" size="2"&gt;&lt;font color="#ffffff" size="2"&gt;&lt;font color="#ffffff"&gt;The application runs fine from Visual Studio and does what it is supposed to:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;img style="WIDTH:638px;HEIGHT:406px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/app.png" width="638" height="406" alt="" /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;I copied all the code above in CodeRun to see how it works. The directory structure is pretty much the same, so it shouldn&amp;#39;t be a problem to find the &lt;strong&gt;Page1.xaml&lt;/strong&gt;&amp;nbsp;and the &lt;strong&gt;Page1.xaml.cs&amp;nbsp;&lt;/strong&gt;files. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;It might take a while (as I mentioned - 20 to 30 seconds) to build the application.&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:251px;HEIGHT:119px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/init_debug.png" width="251" height="119" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Also, the application is compiled on the remote server (not on the client machine). After that, the application is downloaded.&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:455px;HEIGHT:252px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/download_app.png" width="455" height="252" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And here it is, the same application up and running. It loads the &lt;strong&gt;XBAP&lt;/strong&gt; file from the server and interprets it on the local machine (.NET Framework 3.5 is a prerequisite).&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:820px;HEIGHT:761px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/WPF_Browser/running_app.png" width="820" height="761" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Overall, CodeRun is probably the first step in WPF development in the browser and it doesn&amp;#39;t offer something you would get in Visual Studio, but it is a concept, that can be developed in a fully-functional WPF development environment pretty soon.&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;If you want to try this for yourself, just visit the &lt;a href="http://www.coderun.com/" target="_blank"&gt;CodeRun&lt;/a&gt; website.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/home/?status=RT+%40DennisCode+Creating+WPF+Applications+Online+with+CodeRun+http://bit.ly/QTCrd" target="_blank"&gt;&lt;img style="WIDTH:100px;HEIGHT:30px;" border="0" src="http://blogs.windowsclient.net/blogs/ddelimarsky/tweet.png" width="100" height="30" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=267598" width="1" height="1"&gt;</content><author><name>ddelimarsky</name><uri>http://blogs.windowsclient.net/members/ddelimarsky.aspx</uri></author><category term="wpf" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/wpf/default.aspx" /><category term="online" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/online/default.aspx" /><category term="foundation" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/foundation/default.aspx" /><category term="presentation" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/presentation/default.aspx" /><category term="coderun" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/coderun/default.aspx" /><category term="browser" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/browser/default.aspx" /><category term="application" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/application/default.aspx" /><category term="windows" scheme="http://blogs.windowsclient.net/ddelimarsky/archive/tags/windows/default.aspx" /></entry><entry><title>Welcome</title><link rel="alternate" type="text/html" href="http://blogs.windowsclient.net/ddelimarsky/archive/2009/09/11/welcome.aspx" /><id>http://blogs.windowsclient.net/ddelimarsky/archive/2009/09/11/welcome.aspx</id><published>2009-09-11T13:03:00Z</published><updated>2009-09-11T13:03:00Z</updated><content type="html">&lt;p&gt;Hi! I&amp;#39;m Dennis Delimarsky, the founder of this blog. &lt;/p&gt;
&lt;p&gt;Wherever you come from (you could find my blog in so many different ways), welcome to the house of XAML (well, it is called The XAML Box). Here you will find articles and webcasts on Windows Presentation Foundation (WPF), that will help you improve your knowledge of WPF and some things that stand behind this technology, so check this blog once in while! If you have any comments regarding the content, ideas or you just want to ask me something, feel free to &lt;a href="http://blogs.windowsclient.net/ddelimarsky/contact.aspx"&gt;contact me&lt;/a&gt;&amp;nbsp;or find me on one of the social networks listed &lt;a href="http://blogs.windowsclient.net/ddelimarsky/about.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thank you for visiting!&lt;br /&gt;Dennis&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=266861" width="1" height="1"&gt;</content><author><name>ddelimarsky</name><uri>http://blogs.windowsclient.net/members/ddelimarsky.aspx</uri></author></entry></feed>