PropertyGrid ComboBox Select Index Change

Hi All,
I am trying to create my own application using Go .Net trial version. I have added my own shape in ToolBox Window and I can assign the Property of that shape using UserObject of that View.
But i can not change the propety grid - combo box’s selected index or object according to a highlighted object.
While i am building itself , i am getting NullReference Exception.
Here is the Snippet of the Code
--------------------------------------------------
protected void comboBox_SelectedIndexChanged(Object sender, EventArgs evt)
{
switch (this.comboBox.SelectedIndex)
{
default:
case 0:
this.Object = this.View.Selection.Primary; // This line causes NullRefernce Exception
break;
case 1:
{
GoObject obj = this.View.Selection.Primary;
if (obj != null)
this.Object = obj.Layer;
else
this.comboBox.SelectedIndex = 0;
break;
}
case 2:
this.Object = this.View.Document;
break;
case 3:
this.Object = this.View;
break;
}
}
Thanks in Advance,
Natraj.

Did you check that the View property had been set properly?