Posts

  • Talking at the NYC .Net Users Group

    On March 20th 2008, I will be giving a WPF related talk at the New York’s .Net Users Group. The session is titled “WPF Beyond the Basics: Playing tricks with the Visual Tree”. If you are around that area do come along. For more information go to this link: http://www.nycdotnetdev.com/EventMain.aspx?type=N A map of the directions is below: Hope to see you there !
  • Super Fast alternating row colors in a ListBox

    One of the applications we are building required a ListBox control that displayed a bunch of contacts. We also wanted to make the rows in the ListBox have alternating row colors, just like the figure below:

    image

    Continue reading...

  • Standardizing the development of custom controls

    Over the past couple of months I got many opportunities to develop a variety of custom controls for WPF. Some of them are as basic as a Numeric TextBox and some are as complex as ElementFlow. It is interesting how many times the same set of patterns repeat themselves again and again. In this post I want to share a few ideas related to standardization of custom control development. I believe that such a thinking process could simplify creation of new custom controls.

    Continue reading...

  • Playing with Wordpress, PHP, Photoshop, CSS, XHTML

    The switch to my new blog @ Pixel-in-Gene has given me lot of flexibility to experiment with ideas. I have been spending a little more time playing with toys like Wordpress (theme and plugin development), PHP (the backbone of Wordpress), Photoshop (uber design tool) and of course CSS and XHTML. I was a Web developer in the past, so getting back to these technologies has been refreshing.

    Continue reading...

  • How to do Sort / Filter / Group in your custom control

    In one of my recent experiments, I was required to add sortingability to a custom control. The control itself displays a bunch of items just like the SlideDeckPanel. Additionally for each item Add / Remove the control also sorts the items automatically. Before I describe how I did it, let me talk a little bit about the control, just to set the context.

    Continue reading...

  • “the WPF Way" is here!

    Hello All, I have moved my earlier blog “the WPF Way…” to this site. If you have subscribed to it earlier, please update your feed. You can find the feed URL at the top of this page. Thanks!
  • Community input on Write - Speak - Collaborate

    Over the past couple of months I have received fairly good response and feedback to some of the posts that I have made. I have also received some criticism that I don’t share enough code.

    Continue reading...

  • Degrafa goes live

    Although WPF development is my full-time activity, I also spend a considerable amount of time with Adobe Flex. Over the past couple of weeks I have been involved in an exciting Open Source project called Degrafa. Degrafa is a Declarative Graphics Framework for Flex that simplifies access to the Flash/Flex graphics API. People familiar with Flex know that creating simple shapes, paths requires Actionscript programming and cannot be done directly in MXML. This becomes very cumbersome especially when creating programmatic skins for Flex.

    Continue reading...

  • Smooth animations, at the Window level

    If you have ever tried animating the Width / Height of a Window control, you would notice some jerkiness during the animation. This happens because the Window control is not really living entirely in the WPF sandbox. It is part WPF and part Native. To achieve a really smooth animation, you have GOT TO BE inside the WPF sandbox. But how do I do it?

    Continue reading...

  • Controlling Z-Index of children in Custom controls

    In WPF, the standard way to control Z-Index (programmatically) is to use Panel.SetZIndex(). However that works well only if you plan to use a list of children inside a Panel. What if you want to get the Z-Index functionality in your own custom controls ?

    Continue reading...

  • WPF In Finance Contest [Promo Post]

    Got some great ideas? Want to do it in WPF and also earn some big bucks? A “YES” means you should check out Lab49’s WPF Innovation Contest.
  • Improved DragDropManager - Source code

    The DragDropManger has been a very handy class for me in couple of my projects. Since my last post I made some changes to the interfaces (IDragSourceAdvisor, IDropTargetAdvisor) and also to DragDropManager. There are no major changes except for a few method additions in the interfaces. These methods make it even more flexible.

    Continue reading...

  • SlideDeckPanel - panel that does Card Deck layout

    In one of my recent explorations in a project I had to implement a panel layout that displayed its items as cards that have been fanned out right->left.

    image

    Continue reading...

  • File organization tip for Custom Control authors

    Custom controls can be fun to develop. Depending on the complexity of the control it would be a good practice to break it down into manageable pieces. While developing ElementFlow, I discovered such a technique which you may also find useful.

    Continue reading...

  • TransitionContainer: Easy transitions between views

    Transitions, which is another word for animating between views, is a great way of keeping the user engaged as he interacts with your application. Most applications would contain a wide variety of views, where each view aids in interacting with a specific functionality of the application. When switching to a different view, a gradual animated change is far superior than an instant switch. It gives a context to the user telling him where he was earlier and where he is going to next.

    Continue reading...

  • The iPhone (-like) interface in WPF

    Sometime back I had worked on an internal Instant Messaging client for our company. We were looking for some inspiration for our client interface and at about the same time the iPhone****was introduced. After a lot of thought (which was like “few minutes”), we decided to mimic the iPhone interface for our client.

    Continue reading...

  • ElementFlow is now a Panel !!!

    The ElementFlow control was something I was working on a while back and I even posted about it here. The control originally derived from a FrameworkElement and had its own properties for enabling binding to a data-source, namely ElementsSource and ElementTemplate. These properties behave similar to the ItemsSource and ItemTemplate of ItemsControl.

    Continue reading...

  • ItemSkimmingPanel - a panel that does more than just layout

    Recently Apple released their next version of iLife, which has some cool enhancements to iPhoto and iMovie. One specific enhancement called “skimming” was interesting from my project’s perspective. The idea is that when you scrub your mouse over an album, it skims through all the photos in that album. The same interaction applies when you scrub your mouse over a movie clip: it skims through all of its frames.

    Continue reading...

  • Creating WPF based addins with System.AddIn

    With Framework 3.5 we have a new namespace called System.AddIn which is useful for creating AddIn based application architectures. For an introduction to this namespace and its usage refer to:

    Continue reading...

  • Making the Scrollbar work (with DragDropManager)

    This post is a corollary to a set of posts I did on the DragDropManager component.

    Continue reading...

  • BalloonDecorator source code

    Sometime back I had posted about a simple Decorator that draws Balloon Text, similar to the speech balloons you see in comic strips. I called it the BalloonDecorator. At the time of the post I found some minor bugs and delayed posting the source. Although I fixed the bugs I was a little lazy to upload the source. Thanks to few of my readers for nagging me :) I finally got around to do just that.

    Continue reading...

  • Nice article on extending WPF animation classes - MSDN

    Charles Petzold has published an interesting article on creating custom animation classes. Read it here. Sometime back I had used these concepts in making the GenieAnimation. It would have saved me some time if Charles had published this article earlier :)
  • The ElementFlow custom control - can do CoverFlow too!

    I am sure many of you have heard and even interacted with the CoverFlow view of iTunes. In the WPF world we have the good folks from Thirteen23, who have created an app called Harmony that shows off the use of CoverFlow. They make good use of the Viewport3D to pull the desired effect.

    Continue reading...

  • Structuring a WPF User Interface

    When creating a typical user interface, say a Window, Page or UserControl, we start with the top-level container and nest other containers or controls inside it. This is a good approach for a first attempt. But just like we refactor our code to make it more maintainable, we should also be refactoring the User Interface by applying similar principles. Such a refactoring leads to a more maintainable view. Also since we are only refactoring, the final view looks the same but the internal construction is different. In this blog post I’ll present some such refactorings in the context of the WPF User Interface. Note that the concepts I present here are already popular when developing with Adobe Flex.

    Continue reading...

  • XamlXporter - Formatting numbers for German Locale

    Alexander Ullrich from Germany has been kind enough to share a patch of the XamlXporter library (Exporter.Core), which fixes the formatting of the floating point numbers for German locale. If you are facing such an issue you can download the patch here. Thanks Alex!