WPF Flyby – a YouTube video demonstration

Posted on

This thing that I’ve been talking about all day which has been driving me up the into a wall is finally in a state that is viewable.

Its a basic set of 3D text and a shape, neither of which is “rendered” in the way that many are used to when thinking of using 3D modeling tools, instead, its been kept somewhat raw but in an interesting way – its all kept as code – XAML to be exact.  It includes environmental factor code to allow for lighting and color variations when the text “interacts” with the lightsource.

I don’t know enough to know if it can be used in a way where multiple sources of light are present, but at this point, I’m pretty impressed at the power of XAML.

The below video is a camtasia recording of the “application” such as it is.  The button is set up, not with a trigger to start (which could have easily been set), but by a c# method.

The only thing that I would do differently is to have the button reset the storyboard to 0 (zero) on mouseDown which should allow for the storyboard to “rewind” and replay.

I’m wondering if it would be something where it would detect the place of the animation – such as  if the storyboard is greater than 0, then reset to 0.

I’m digging around google and have posted on the WPF MSDN forums to see if I can find an answer.

Anyway, here’s the video:

Media Player – a YouTube video of it

Posted on

The media player which Victor’s book steps you through on chapter 6 is complete.  I customized it a bit and added a back button, which was coded essentially as an inverse of the next button.

As far as the user experience elements, the play button plays, stop button stops, and pause button pauses, however, the pause button was set up as a toggle, so if it is pressed while paused, it will resume play.

Cool part that I feel I should mention is that all of the visual elements are done in XAML. The buttons appear to have been done in photoshop or illustrator, but they’re not. They’re 100% XAML code.

The limitations which I’m seeing are as follows:

The logic behind the next and back buttons are limited.  If you hit next to get to the next video, that works, however, you hit it again, and it doesn’t toggle back to the original – it just replays the 2nd video.

The same goes for the back.  If its on the first video and its playing, and you hit the back button again, it restarts the first video.

The last bit which somewhat makes me internally twitch, is that at this point, these buttons are functional, but they don’t appear to interact with the user.  I know – we’ll likely get there further into the book, but at the very moment, I just have to take my knowledge that they do actually do something and pretend that the interaction with the buttons is there in a, “Perhaps I blinked?” sort of way.  We’re not far enough through the book to start making further interactions, but in the interest of my own sanity, I told all of my buttons to change the cursor to the “Hand” so as to make them somewhat appear as if they were more than pretty pictures on a gradient.

Below is the video:

Note: This is second published video which displays an example of what can be accomplished as you’re going through this book on Blend 2. To view the first video posted click here.

3DImage – a video of the lab

Posted on

Depending on the project and the visuals, I felt that it would be beneficial to not only blog about the experience while going through the book, but to give further visuals for those who are following this blog – perhaps it will assist those in making their decision as to which books might be good – so here is a youtube video of one of the very first things which you are walked through doing in Victor Gaudioso’s book on Expression Blend 2.  This is at the very end of chapter 3 and is pretty easy to do.  I took it a step further than explained, but if you are following along in the book, you’ll notice that nothing that I have done here is outside the scope of information that has been explained through the first few chapters.  To reword that: If you’ve never used MS Expression Blend before, you could use the knowledge gained up to this point to emulate what is done in this video.