Hi Vijay,
I tried your example and it worked without a problem. My situation is a bit different. Our custom docking manager is responsible for querying some configuration settings and it enables docking for the controls and sets the attributes (such as labels, icons, etc.). This all works, except for the icon. I have changed your Form1.cs to show you what I mean.
Thanks for your help... Mike
F20876AHTabBackColor-Mike_7534.zip
>
>Hi Mike,
> I just forgot to attach the sample in my previous response.
> http://syncfusion.net/ExternalSupport/Tools/2005/June/F20876AHTabBackColor.zip
>
>Thanks,
>Vijay
>
>>Hello, I am attempting to assign an icon to a docked control during the initialization process. Note, I am using the System.Drawing.Icon overload. When I do this, I get the following exception:
>>
>>An unhandled exception of type ''System.NullReferenceException'' occurred in syncfusion.tools.windows.dll
>>
>>Additional information: Object reference not set to an instance of an object.
>>
>>The code I am using, looks like this:
>>
>>// Note, I''ve extended the DockingManager, so "this" is the DockingManager.
>>this.DockControl(control, this.Parent, dockStyle, initialSize);
>>this.SetDockLabel(control, labelControl.Label);
>>System.Drawing.Icon icon = this.appContainer.GetImageIcon(labelControl.IconList, labelControl.IconName);
>>if (icon != null) this.SetDockIcon(control, icon);
>>
>>I would appreciate any help or insight into this matter.
>>
>>Thanks, Mike