| By Bill Wolff | Article Rating: |
|
| September 3, 2005 09:00 AM EDT | Reads: |
25,189 |
The codebase statement tells the browser to download the Flash player if one is not already installed on the machine. Depending on browser security settings, the user may be prompted for this download or shown a message indicating that content is blocked. In most cases, the player is already available and movie file is loaded immediately (see Figure 10).
Adding graphics to XAML is a snap. There are several elements in the revised app.xaml file. The rectangle creates a box with a gradient fill. The ellipse draws a blue shape, a given coordinate. The textbox places text as needed. The panel has a set of paths that combine to form an airline seat. These were copied from one of the Xamlon samples. Paths can be generated from an existing SWF or an Illustrator file. The Panel is used to position the seat (see Listing 2). Compiling this version results in the flashy dialog shown in Figure 11.
Imperative programming can be mixed with the declarative XAML design. Add an Image control (JPG and PNG, not GIF) and set the source and location. This code, when added to the button click event, dynamically loads a JPG that displays at a defined coordinate. Flash movies can be loaded in the same fashion offering some interesting animation possibilities:
desktop = desktop.GetDesktop()
Xamlon.Internal.Utilities.SetIndex(-10)
Dim i As New Image
i.Source = "billjwolff.jpg"
i.X = desktop.Width - 100
i.Y = desktop.Height - 150
desktop.AddChild(i)
A Complex Web-Driven App - AFLAX
There is an excellent stock market ticker sample included in the Xamlon Web install. The AFLAX design pattern is used to create an animated view of real-time data feeds. One project runs server side to deliver XML data to the client. It uses an ASPX page with content type set to text/xml. An XML list of stock tags is loaded into an arraylist. For each stock, HttpWebRequests connect to the Yahoo Finance sight to collect real-time data. The data is packaged as XML and sent to the client.
The client uses XAML to dress the window frame and a series of graphic images to display historical charts. A timer object fires an event that makes a background call to the server page to retrieve the latest XML. The data drives some graphic primitives that create the real-time chart. Figure 13 shows the finished product, all packaged in a tidy 73K SWF file.
Xamlon Futures
XAML will be a major component of every developer's toolbox in the next few years. Microsoft promises a WinFX release that will deliver parts of Avalon and XAML to Windows XP and Windows Server 2003 early next year. Xamlon technology gets you there today.
Xamlon Web has a compelling value proposition. Compiling next year's declarative markup technology with today's popular .NET languages to produce the ubiquitous SWF file format is a great way to deliver leading edge applications. Xamlon Web is scheduled for release this summer. Watch their Web site (www.xamlon.com) for details.
Published September 3, 2005 Reads 25,189
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Bill Wolff
Bill Wolff is an independent consultant, trainer, and architect specializing in Microsoft development technologies. His company, Agility Systems, is based in the Philadelphia area. He ran the consulting firm Wolff Data Systems for 15 years and directed armies of consultants in the dot com world. Bill is founder and President of the philly.net user group, board member for INETA (Vice President, Speaker Bureau), and he is active in several other user communities. Bill was a contributing author to several books and articles and he currently writes for .NET Developer's Journal. His certifications include trainer, systems engineer, developer, and Microsoft MVP for VB.NET.
- Kindle 2 vs Nook
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Windows 7 – Microsoft’s First Step to the Cloud
- Cloud Expo and the End of Tech Recession
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Reality Check at the Cloud Computing Expo
- Visual Studio 2010 Is Cloud Friendly
- Fired SCO CEO Fires Back
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- Wave on Ulitzer: Confessions of a Google Wave Fanboy
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Best Practices
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Eval JavaScript in a Global Context
- Windows 7 – Microsoft’s First Step to the Cloud
- Google Maps and ASP.NET
- Crystal Reports XI & How It Has Changed
- Converting VB6 to VB.NET, Part I
- Creating Controls for.NET Compact Framework in Visual Studio 2005
- Where Are RIA Technologies Headed in 2008?
- How to Write High-Performance C# Code
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Implementing Tab Navigation with ASP.NET 2.0
- i-Technology Photo Exclusive: Bill Gates & Steve Jobs In "Nerds"
- .NET Archives: Getting Reacquainted with the Father of C#
- i-Technology Viewpoint: "SOA Sucks"
- Programmatically Posting Data to ASP .NET Web Applications




























