.NET Bootcamp zu Silverlight und WPF

Am 20. März 2009 wird unter meiner Regie das dritte .NET Bootcamp der .NET User Group Leipzig stattfinden. Wie sollte es anders sein, geht es dabei um Microsoft Silverlight und die WPF. Die Registrierung ist ab heute aktiviert. Die Plätze sind limitiert, daher schnell anmelden. Falls ihr nicht wisst, was hinter den Bootcamps steckt und wie diese ablaufen, kann ich diesen Artikel von Torsten empfehlen.

IMG_3361

Handling the BezierSegment as path in Silverlight

This small sample will show you the possibilities of Silverlights (and WPFs) BezierSegment class. To draw a bezier curve you have to encapsulate the BezierSegment as part of a Path element as shown in the following lines of code:

1 <Path x:Name="Curve" Stroke="#FFFFFFFF" StrokeThickness="2"> 2 <Path.Data> 3 <PathGeometry> 4 <PathGeometry.Figures> 5 <PathFigureCollection> 6 <PathFigure x:Name="Figure" StartPoint="27,56"> 7 <PathFigure.Segments> 8 <PathSegmentCollection> 9 <BezierSegment x:Name="Bezier" Point1="227,156" Point2="267,36" Point3="380,30" /> 10 </PathSegmentCollection> 11 </PathFigure.Segments> 12 </PathFigure> 13 </PathFigureCollection> 14 </PathGeometry.Figures> 15 </PathGeometry> 16 </Path.Data> 17 </Path> 18

The curve itself is rendered using four points: the StartPoint attribute of the PathFigure element and the three points Point1, Point2 and Point3 of the BezierSegment. Try to play around with this sample and feel free to have a look into the sources.

Get Microsoft Silverlight

WPF Workshop @ tegos

Funny to see my name displayed on the big TFT screen in the lobby of tegos, where I presented my first Windows Presentation Foundation instruction last week.

image

Usability Thementag am 18. April in Leipzig

Benutzerfreundlichkeit ist zunehmend ein wichtiger Bestandteil heutiger Softwareentwicklungsprozesse. Sowohl für Desktop-Anwendungen als auch im Bereich des Web ist es notwendig den Endbenutzern eine intuitive Oberfläche zur Verfügung zu stellen, um effektiv und benutzerfreundlich mit dem Produkt arbeiten zu können. Dies spiegelt sich in einer höheren Produktivität beim Umgang mit der Anwendung wieder.

imageNeben technologieorientierten Lösungsansätzen, wird im ersten von drei Vorträgen im Allgemeinen auf Benutzerfreundlichkeit im alltäglichen Leben eingegangen. Weiter geht es mit Usability-Aspekten im Bereich des Web, gefolgt von einem Vortrag zu technischen Möglichkeiten mit der Windows Presentation Foundation (WPF) und Silverlight. Abgerundet wird dieser Tag mit einem 90minütigen Workshop, wo die gelernten WPF-Kenntnisse in einer kleinen Demo-Anwendung direkt am Rechner umgesetzt werden können.

Die Anmeldung erfolgt über eine E-Mail an anmeldung AT dotnet-leipzig DOT de mit Vorname, Nachnahme und dem Betreff "Usability". Die Teilnehmerzahl ist bzgl. des Workshops begrenzt. Gibt es mehr Anmeldungen als Plätze, entscheidet die Warteliste.

18.04.2008, 9:00 – 17:00 Uhr, Universität Leipzig (WiFa), Marschnerstraße 31, Raum 240.

Ich bin im Fernsehen

Naja. Mehr oder weniger im Fernsehen. Eigentlich "nur" im Internetfernsehen. Während meines dreitägigen Besuchs der Frankfurter Messe zur Microsoft Launch Tour 2008 letzte Woche wurde ich zusammen mit Grischa und Torsten von Lori interviewt. Dabei ging es um das kommende Referenzprojekt zu Visual Studio 2008 und .NET 3.5. Momentan arbeiten wir unter dem Codenamen Trian weiter an den Beispielen, die in naher Zukunft hoffentlich vielen Entwicklern zur Verfügung stehen werden. Aber seht und hört selbst, worum es dabei grob geht:


Tic Tac TRIAN

Zoomable ultra high resolution Silverlight clock

I like this nifty vector based scaling feature of Silverlight. That's why I was not often seen the last day and today. I developed a nice little clock based on one theme of the Clock Gadget of Windows Vista. Using Microsoft Expression Blend 2 December Preview and Visual Studio 2008 made it easy to get to the results.

But how to play with this toy: You can move the clock with a simple mouse drag and drop. For showing this cool effect of resizing I added the little white button on the top left of the clock. It's also just a drag and drop action on this button, to do the scaling of the clock. By pressing the Shift button while doing the resize movements you'll fix the aspect ratio of the clocks height and width. It's also possible to switch to full screen mode and back again by double clicking the background of this canvas.

The Visual Studio 2008 source of this smart application can be found here.

Download: Clock.zip

Simple billard game in Silverlight

After one day of trying and researching on Silverlight I implemented a simple game. My intention was to create a game that runs in fullscreen on a tablet PC including the usage of the stylus pen. I thought it could be pretty cool to build a billard table, because it feels like a real game, if you use the stylus as cue while playing with virtual balls. And here is the result.

For sure it's not that realistic, but it shows the features that Silverlight may afford for a new web experience. Another idea for a game project that matches this kind of gameplay could be a minigolf application. Hmmm. I can see myself staying in front of my lowered tablet while swinging a stick (with my attached stylus). ;-)

If you are interested in the sources of the billard game, you can download the xaml, js and html files here.

New version of Microsoft's Silverlight

On Monday at the Mix '07 Microsoft presented a new alpha release of Silverlight 1.1 that comes up with pure .NET support. This cross-platform plug-in for browsers now includes a small core of the .NET framework, which allows developers to write managed code for web applications.

I'm going to check out, what the new features are and how these can improve the process of building applications for the web.

WPF/E becomes Microsoft Silverlight

Last weekend at the National Association of Broadcasters Microsoft announced Microsoft Silverlight to be the new "cross-platform, cross-browser plug-in for delivering the next generation of media experiences and rich interactive applications (RIAs) for the Web."

As I read there are no new features available with this announcement. The SDK is still the same as the Community Technology Preview (February 2007) release.

For more information look at: http://www.microsoft.com/silverlight/

Difference between WPF, WPF/E and XBAP

Getting closer to all the XAML stuff around the Windows Presentation Foundation I bumped into some understanding problems about all the new concepts. What are the meanings of all these shortcuts?

WPF

Stands for Windows Presentation Foundation (formerly known as Avalon) and is part of the new Microsoft .NET Framework 3.0 which is an extension to the existing .NET Framework 2.0. With WPF Microsoft relieves the older Windows Forms programming model and supports the software development process to be split into two different parts:

  • Design phase, where creative artists build the UI using Microsoft Expression or third party tools like Zam3D or Aurora;
  • Development phase, where the applications core functionality (business logic) will be implemented

The WPF team designed XAML (Extensible Application Markup Language) an XML-based scripting language to create user interfaces declaratively. The XAML markup is the interface between the design and implementation phases. The aforementioned designer products spit out XAML, that can be programmed through events and the underlying object model.

WPF/E

Means Windows Presentation Foundation Everywhere. It is a subset of WPF that only shares the XAML presentation layer. This means you won't have WPF controls (buttons, textbox, ...) or databinding support in WPF/E. Only the basic elements for graphics, event handling (using JavaScript) and media are available. The big advantage of this solution is that a visitor of your website doesn't have to install the whole .NET Framework 3.0 (54MB) on his client machine. WPF/E provides a cross platform option to enable XAML based content in different browsers. This is done shipping out plug-ins for common browsers like Mozilla Firefox, Internet Explorer 6+ and Apple's Safari. These add-ons are less than 2 MB, thus it is nearly the same size than Adobe's Flash Player plug-in. But regard WPF/E as being an extension for existing web technologies like ASP.NET, AJAX, PHP, ...

Today WPF/E is not in a final state, but will be finally released by mid-2007. In version 2.0 C# and VB.NET should be available, which will extend the current JavaScript support.

XBAP

Stands for XAML Browser Applications. You maybe get to the conclusion, that this is equal to WPF/E. But there is a big difference. With XBAP you can provide a complete WPF application (without restrictions to the whole WPF functionality) to a client browser. The browser is the application host in this situation. Therefore the .NET Framework 3.0 has to be installed on the client side. You also have to ensure, that operations within your XBAP won't run into security problems on the client (e.g. file system access). This reflects the difference between a stand-alone WPF application and an XBAP: WPF applications run with the priveleges of the currently logged in user, whereas XBAPs are launched inside the browsers sandbox that has just a very small set of privileges. XBAPs and the security issues are pretty difficult. Maybe I can come closer to this in a future post.

In upcoming posts I'll step into more details about WPF/E, because I'm now looking for a new solution for combining my blog page and the flash based picture page.