Resource Viewer V2.0

Version 2.0 is out!

Read the first post and full description: Resource Viewer – A Visual Studio Extension

New in V2.0:

  • Added support for additional resource types – now you can also view your Brush(es):DrwaingBrush,  SolidColorBrush, Gradients, etc.
  • Details view.
  • The code is now constructed better.

The whole project and source code is maintained here:

It is also hosted in the Visual Studio gallery, here: Resource Viewer


Resource Viewer – A Visual Studio Extension

Simply put the “resource viewer extension” enables you to visually view your ResourceDictionary.

To open it go to: View – Other Windows – Resource Viewer.

When working with WPF/Silverlight you put your reusable resources in a common ResourceDictionary, those resources might be of type Style, SolidColorBrush, DrawingBrush, BitmapImage and more. The problems starts when you have that ResourceDictionary you have no way to see how your resources look like, making the work process (of both the developer who maintains this dictionary and the one who uses it) clumsy and based on guessing.

This extension comes to solve those problems!

With the “Resource viewer “ extension you can open any ResourceDictionary and actually see how your resources look like – your icons, brushes, etc. are all being visualized right inside Visual Studio.

Than when you’ve found the resource you’ve been after you can “inject” it into a file that is opened within Visual Studio.


  • A Visual Studio 2010 extension – meaning it integrates with VS api and behave like any other window (docking, floating etc.)
  • Open any XAML ResourceDictionary file on your computer – simply browse to it.
  • When you open the viewer it automatically opens the last opened file.
  • Most recently used files list.
  • Refresh button to reload the opened file.
  • The opened file is being watched for changes, if a change is made you’ll be notified.
  • Zoom slider and zoom presets.
  • Search box.
  • Inject the selected item’s x:Key into an opened document by double-click on an item or pressing the “Inject” button.
  • Inject prefix and suffix strings. Those are saved and persisted.

Future plans:

  • Current version handles only DrawingImage, add handling for more resource types.
  • Add handling for Merged Dictionaries.
  • Add a detailed view for the selected item.
  • More…

If you are willing to help in any way please drop me a note.

The whole project and source code is maintained here:

It is also hosted in the Visual Studio gallery, here: Resource Viewer

Silverlight: GridSplitter with a collapse button – BEST

I don’t remember where I took this control from.
It is not my work so I cannot take credit for it.
I have only fixed some stuff and made some changes to the animation.
This is by far the BEST version of this control! Use this one!
All credits goes to the anonymous developer who made it.
it should go into the Toolkit.

Demo is here
source is here

Silverlight: ListBox ItemsChanged event

Bits me why this is not implemented.
i was missing an event on the ListBox – ItemsChanged.
as you can see the implementation is so easy:

using System.Collections.Specialized;
public class ListBoxGeneric : ListBox
    #region Constructor
    public ListBoxGeneric() : base() { }
    #endregion  Constructor

    #region Override
    protected override void OnItemsChanged(
        NotifyCollectionChangedEventArgs e)
    #endregion Override

    #region Class Events

    public delegate void ItemsChangedEventHandler(object sender,
        NotifyCollectionChangedEventArgs e);
    public event ItemsChangedEventHandler ItemsChanged;

    private void OnItemsChangedEvent(
        NotifyCollectionChangedEventArgs e)
        if (ItemsChanged != null)
            ItemsChanged(this, e);

    #endregion Class Events

Silverlight: GridSplitter with a collapse button (V2)

This is a continuation of my last post.
I have made a better version of my ExtendedGridSplitter, this one works in both horizontal and vertical placement, I have made it more reliable and easy to work with.

Plus… I have found this post about animating Grid columns & rows and implemented it in my sample application.

Demo is here
Source is here

update: go to this post and use the best version of this control

Silverlight: GridSplitter with a collapse button

(Silverlight is much more hard-to-handle then Flex)

This is my first blog about Silverlight !!

Not much to explain here, just look at the code and ask questions.
I have added a button to the GridSplitter by sub-classing it.
Then later I used templates, styles and events to give the collapse button its look and functionality.
Of course you can make everything look better by applying styles (my collapse button is a simple red rectangle).

By handling some simple events I control the collapsing and expanding.
Notice that while dragging the splitter to the far left the button will change its arrow direction.

That was a good lesson.

Demo is here
Source is here

update: i have made a better version of this, look here.
update: go to this post and use the best version of this control