How to model an IC in WPF?
I'm building a user control using WPF to resemble a breadboard that will be used in an electronic circuits simulation software.

The user will be able to add ICs onto that breadboard.

I've finished building the breadboard right now, it consists mainly of a grid that has a number of cells equal to the number on nodes on a real breadboard..

And right now I made users add ICs to that grid by specifying the Grid.Row and Grid.Column and determining its size by specifying Grid.RowSpan and Grid.ColumnSpan

[Like this photo..][1]

Here is the C# code:

    
    private int usedVerticalPins = 0;
        void AddICs(int pinNum)
        {
    var rect = new Rectangle() { Fill = new SolidColorBrush(Colors.Black),Stroke = new SolidColorBrush(Colors.White)};
            rect.SetValue(Grid.RowProperty, usedVerticalPins);
            rect.SetValue(Grid.ColumnProperty, 7);

            rect.SetValue(Grid.RowSpanProperty, (pinNum / 2));
            rect.SetValue(Grid.ColumnSpanProperty, 3);

            BreadboardControl.BreadboardGrid.Children.Add(rect);
            usedVerticalPins += (pinNum / 2);

        }

But as you can see, it looks like plain rectangles not as ICs, so I thought of inheriting the class Rectangle and edit the way it looks by I found that it is a sealed class..

I want the ICs to look like [this one][2] with all pins and stuff..

So can you please suggest a way to do it..!?


  [1]: http://i.stack.imgur.com/JbVD2.png
  [2]: http://i.stack.imgur.com/8TLvr.jpg
How to model an IC in WPF?
===

I'm building a user control using WPF to resemble a breadboard that will be used in an electronic circuits simulation software.

The user will be able to add ICs onto that breadboard.

I've finished building the breadboard right now, it consists mainly of a grid that has a number of cells equal to the number on nodes on a real breadboard..

And right now I made users add ICs to that grid by specifying the Grid.Row and Grid.Column and determining its size by specifying Grid.RowSpan and Grid.ColumnSpan

[Like this photo..][1]

Here is the C# code:

    
    private int usedVerticalPins = 0;
        void AddICs(int pinNum)
        {
    var rect = new Rectangle() { Fill = new SolidColorBrush(Colors.Black),Stroke = new SolidColorBrush(Colors.White)};
            rect.SetValue(Grid.RowProperty, usedVerticalPins);
            rect.SetValue(Grid.ColumnProperty, 7);

            rect.SetValue(Grid.RowSpanProperty, (pinNum / 2));
            rect.SetValue(Grid.ColumnSpanProperty, 3);

            BreadboardControl.BreadboardGrid.Children.Add(rect);
            usedVerticalPins += (pinNum / 2);

        }

But as you can see, it looks like plain rectangles not as ICs, so I thought of inheriting the class Rectangle and edit the way it looks by I found that it is a sealed class..

I want the ICs to look like [this one][2] with all pins and stuff..

So can you please suggest a way to do it..!?


  [1]: http://i.stack.imgur.com/JbVD2.png
  [2]: http://i.stack.imgur.com/8TLvr.jpg