Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Team Bloggers

Browse by Tags

All Tags » WPF » Windows Presentation Foundation (Avalon)   (RSS)

  • COLLABORATING ON CREATING ANIMATIONS IN WPF AND BLEND: POSSIBILITIES AND LIMITATIONS

    One area that is currently top of mind for me is designer and developer collaboration with WPF and Expression Blend, in particular around animation. I'd like to start documenting some techniques and outlining things that can and can't be done. Before diving in, let's quickly review the animation system in WPF. The two ways to do animation in WPF is either declaratively (XAML) or procedurally (code). If you use Expression Blend to create your animations, you will be in effect using the declarative (XAML) method. What gets slightly confusing is that the two methods, declarative and procedural, are not entirely in parallel. For example, the only way to begin an animation declaratively (XAML) is through the < BeginStoryboard > tag. However, the equivalent call in code is to call the Begin method off a UIElement and passing it the storyboard to fire. The other option is to call the Begin method from a storyboard itself, passing it the UIElement to which the storyboard should be applied. Read More...
  • CREATING A .NET TWITTER API in 4.5 SECONDS

    I've been meaning to document how I wrapped the Twitter API ... in 4.5 seconds. There is a very powerful feature in .NET is a tool in the sdk called xsd.exe . Darren David actually has a fabulous post on exactly the power of this tool: never touch a DOM or XPATH again! His post explains what is happening under the hood with xsd.exe quite nicely. I'd definitely recommend reading his post. I figured it might be interesting for folks to see the exact steps I took to wrap the Twitter API: 1. Grab an instance of the public timeline from Twitter and pass that to xsd.exe to infer a schema as follows: xsd http://twitter.com/statuses/public_timeline.xml which creates public_timeline.xsd 3. Use the inferred schema to generate classes: xsd public_timeline.xsd 4. Walla! We now have a class to party on called public_timeline.cs 5. To instantiate the class with live data, it is as simple as the following: System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(statuses)); Read More...
  • New Lab Posted: Creating 3D Content with Windows Presentation Foundation

    I just posted a new lab for learning how to use 3D in WPF. This is a great lab that I would highly recommend if you are learning WPF 3D. It shows how to do dynamic animation of 3D content as well as how to do 2D on 3D using the 3DTools . Read More...
  • North Face Case Study Published

    A case study about the North Face Kiosk is now posted to the Microsoft Case Studies site. This is a nice write up, showing how the technology solved business problems, and explaining the larger context of how the kiosk plays into The North Face's overall marketing and sales goals. There are quite a few nice quotes about WPF in there and a shout out to WCF as well. Read More...
  • Inspired By Flash Math Creativity #2: WPF Planets

    My next inspiration from the algorithms introduced in Flash Math Creativity was based on the work of Jamie MacDonald . In looking at his work, I quickly realized that I was going to need to brush up on my trigonometry skills. This led me to another great Friend of Ed book, Foundation ActionScript Animation: Making Things Move , which has some great trigonometry for animation explanations. You can see the results of my latest experiment here and the code is here . Just to make sure I was up an running with basic trig, I created a sine wave in 01 as follows: double x = 0; double y = 0; double angle = 0; for (int i = 0; i < 500; i++) { x += 1; y = 200 + Math.Sin(angle) * 50; Ellipse el = new Ellipse(); el.Width = 2; el.Height = 2; el.Fill = Brushes.Red; Canvas.SetLeft(el, x); Canvas.SetTop(el, y); stage.Children.Add(el); angle += .05; } Nothing fancy here. To make a circle, I changed the x to be x = Math.Cos(angle) * 50. This is the basis for doing circle and ellipse animations. Now, instead Read More...
  • Inspired By Flash Math Creativity: WPF Flowers

    I've recently picked up a great book called Flash Math Creativity . I been inspired by some of the techniques it outlines and have played around with similar ideas in WPF. The exercise has been a fruitful one, in that I'm making some pleasing computer art while also learning about the differences between Action Script animation and WPF animation. The first one I played with is flowers, inspired by the work of Glen Rhodes , which is actually featured on the cover of the book. You can see the results here and download the code here . The first flower, which has no animation, is pretty simple. I just create 125 rectangles with a fill using a DrawingBrush I created in Blend. I place each of the petals on the "stage", which in the case is a Grid . I use Grid instead of Canvas so that I get the goodness of the WPF layout engine for free without having to handle any positioning of the rectangles. I then tranform the rotation and scale of each one to create the flower effect. I also swap the ZIndex Read More...
  • WPF Application Portfolio Wiki Updated -- More WPF Apps!

    Tim has been doing a great job of blogging the many Vista/WPF showcase applications that are being deployed right now. If you are looking for a quick list of URLs that you can hit for the .XBAP or .APPLICATION files, please go to the WPF Application Portfolio wiki , which I've updated with all the links, tagging them with the kind of deployment used -- very cool to see the number of .application and .xbap applications out there! If you are doing a demo and trying to show someone the WPF portfolio, hopefully this wiki page will be useful -- and watch for more coming... I've also added some that Tim hasn't documented yet, in particular a whole bunch from Japan, as well as one from Metaliq on snowboarding visualization. Some screenshots below. http://www.metaliq.com/wpf/ http://weathernews.com/wpfglobal.xbap http://sp.warnermycal.com/vista/contents/preview.xbap http://www.shiseido.co.jp/biyou_dic_vista/shiseido.xbap http://www.dosv.jp/parts_assembler/PartsAssembler.xbap http://japan.cnet.com/wpf/photo Read More...
  • Announcing Expression Blend Beta 2 and Expression Design Beta 1

    You can now go download Expression Blend Beta 2 as well as Expression Design Beta 1 . Both applications have received significant work since their last incarnation with tons of bugs fixed. Go give 'em a whirl. Read More...
  • Databinding In Expression Blend: Forget the Data and Do the Bind

    I just posted a screencast showing how to wire up UI elements using Blend. The general premise is that databinding in WPF is about more than just data; it also allows you to connect UI properties, like wiring a slider up to a progress bar. Blend exposes this is a very useable way, once you know your way around. I also use some cool styles from this Charles Petzold article and show how, in Blend, you can extract a style and template from a piece of XAML to be reused in other parts of your application. Read More...
  • Doninoken: WPF XBAP Piece by Bascule

    Check out Doninoken , an amazing WPF piece that is part of the Japanese Vista launch, done by the design agency Bascule . The aesthetic is amazing. I love how they use WPF 3D, mapping images on planes and animating the planes. (Watch for the small camera that pops up after the title screen that lets you interact with the app and zoom the camera around.) Still, how did they do it? Maya exports? Hand tweaking XAML? It is very impressive. And makes you want some sushi... Read More...
  • The Definitive Post on XBAP Trust Levels

    I've written about XBAPs and full trust in the past, but never as thoroughly as Karen Corby just did in her post on XBAP trust levels . She spent a lot of time getting this post correct, reviewing with various folks within Microsoft and providing very solid guidance. It is the kind of post that should be in the SDK and official docs, but didn't make it due to time constraints. If you have questions about XBAPs and full trust, this is a must read. Her deployment recommendations in particular are essential if you are thinking about going down the full trust XBAP road. But keep her guidance in mind: only do this if you must. ClickOnce .exe's are pretty slick and don't have nearly the issues associated with them as full trust .xbaps. Read More...
  • Yahoo Messenger for Vista Debuts at CES

    I'm here at CES, where Yahoo and Microsoft are thrilled to show off a preview of the new Yahoo Messenger for Vista, built entirely on WPF. Yahoo has a great landing page with screenshots, a screencast of the app and a sign up sheet for when they release a beta. I held off on blogging this until we got the Channel 10 interview posted, where I hooked up with Jeff Sandquist and the crew to do an interview with the Yahoo folks , Joshua Jacobson and Matthew Skyrm, about the application. (If you haven't seen Channel 10, it is the sister to Channel 9, targeted to enthusiasts and power users.) They talk about their motivations for building this new messenger, their experience with WPF and Expression and more. They've got a blog up as well! I've been working with the lead developer, Eric Burke , along with Frog Design , including Lee Brimelow , on this application and the alpha is looking great. This application is a shining example of the opportunities and possibilities of the Vista and .NET 3.0 Read More...
  • Gradient Animation Obsession Redux

    I guess I didn't call it an obsession without reason, as I can't seem to keep away from those hyponotizing gradient animations. I modified the tool I posted last month so that it would output the XAML, such that a designer could actually use the tool and never touch a line of XAML. This also comes in handy because Expression Blend does not allow you to animate gradients since you can't crack into a gradient's RelativeTransform . I set up the tool to output either WPF or WPF/E XAML, as WPF/E doesn't support everything (yet) that the tool uses, such as AccelerationRatio , as well as having a different namespace. I ran into some problems with XAMLWriter and the way it strips x:Name from the XAML it produces, so there is some hacky string replace code in there that I'm not proud of. I could have used property paths as an alternative. Because you can't use XAMLWriter in an XBAP, I made the tool a ClickOnce .application that doesn't get installed on your machine but just runs in the ClickOnce Read More...
  • The North Face In-Store Explorer

    It was at PDC 2005 when The North Face showed a prototype of a WPF kiosk they were building. Well, with Vista and WPF having RTM'd, the real kiosk has been deployed, which you can read about from lead engineer Darren David at Fluid's blog . (Fluid is the agency that did the work for The North Face.) If you live near a North Face retail store , go check it out! This is an exciting milestone for WPF and Vista, as it is one of the most ambitious .NET 3.0/Vista applications deployed to date. Note that the white paper written about this application is still relevant and worth reading. The code samples all work just fine on the final bits and have some useful code as far as state management, image montages and a 3D carousel. Read More...
  • Gradient Obsession: A Tool For Tweaking Gradient Animations

    I started getting slightly obsessed/hypnotized with gradient animations and wanted a tool to see what I could do, so I built one. Basically, I just bound a bunch of sliders to the various transforms on the brush transform. I reused the infrastructure from an earlier post. As you watch the animation and see something you like, you can pause it and note the values for your own purpose. I didn't actually create an exporter for the xaml, but that wouldn't be hard. Download the source or run the XBAP . Read More...
More Posts Next page »

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us