Quick update on the WPF Control Development Unleashed book

As many of you know my co-author Kevin Hoffman and I have been quite busy finishing up a book on WPF control development. We have few more chapters to finish and then we will be content ready for tech review. The first half of the book is already done and we are going through the tech review as I write. The tech review phase will add a lot of polish to the book and make it an enjoyable read. I am glad to have a master-writer like Kevin working with me, who is doing the part of “making it enjoyable” !

At the recent MVP Summit, I got a chance to catch up with other MVP buddies who also provided some valuable feedback on the content. Interestingly, my publisher was also at the Summit and it was the first time meeting him. He can be sure now that it is not a robot writing the book.

In the last few weeks, I got emails from many of you asking about the status of the book. I hope this post will tell you that things are moving towards completion. Some of you have offered to review the book, which was quite flattering for me. I will try to reach out to you once I incorporate the feedback from my current reviewers.

If you are curious to know more about the book, try Amazon. We already have a placeholder for the book!

BTW, this is going to be a full color book with rich set of examples, controls, figures and of course syntax-highlighted code!

image

Similar Posts:

I have started tweeting

I have finally jumped on to Twitter and making sounds (tweets) on @pavanpodila. So follow me and I’ll follow you :-)

 

image

Animating graphs in WPF using Clipping masks

Over the past couple of weeks I have been working on an application that displays a variety of graphs. One of the standard features we have is the load animation for a graph when the user sees it for the first time. For a line graph, this would mean that the graph animates from the left to right and draws itself out.

 image

The technique I am using to do this animation is with Clipping Masks. The graph starts out with a Rectangular mask with zero-width and ends with the full-width of the graph after the animation completes. The height of the mask is the same as that of the graph. The following figure shows how my mask grows in size.

image

 

In Xaml, this can look like so:

<Grid x:Name="GraphContainer">
    <!—Line Graph -->
    <Grid.Clip>
        <RectangleGeometry />
    </Grid.Clip>
</Grid>

 

The above snippet shows the container on which the Clip mask has been applied. The line graph is inside the GraphContainer. The Storyboard looks like:

<Storyboard x:Key="GraphClipAnimator">
    <RectAnimation Duration="0:0:1"
                   Storyboard.TargetProperty="Clip.(RectangleGeometry.Rect)"
                   Storyboard.TargetName="GraphContainer"/>
</Storyboard>

 

Note the use of RectAnimation for expanding the size of the mask. It starts out with a Rect(0, 0, 0, GraphContainer.ActualHeight) and ends with a Rect(0, 0, GraphContainer.ActualWidth, GraphContainer.ActualHeight). We set the From/To values of the RectAnimation inside the Loaded event for the containing Window/UserControl.

 

The advantage of this technique is that you can choose a more elaborate clipping mask (think of arbitrary PathGeometry) to achieve more fluid graph animations. Also we are not affecting the actual graph in any way and all of the animations are happening on its container. This makes it easy to reuse the technique on multiple graphs.

Similar Posts:

A fun After Effects CS4 composition

Last night I was playing around with After Effects CS4 and made this video just for fun. Its nothing fancy, just some 3D shake and some particle effects. Unfortunately I did not save my project so I cannot post the *.aep file. I do have the rendered video, which you can see below. In the future, I will post the project file as well.

 

Page 1 of 1312345»...Last »