Adding an IExtenderProvider to a custom base Form

I am trying to create a custom base class (based on Form) to use in my app development. I want this custom base class to automatically add an IExtenderProvider for all controls I will add when designing the application forms.

I have created the base Form class and the IExtenderProvider. If I add the extender class to the form it will work with any controls I add to the base form. However when I create my app form, I cannot see the extender class or the custom properties on the subclassed form.

I then tried to create code that would run at design time to add this for my app form automatically but it isn't working. I placed the following code in the InitializeComponent method of my base Form class.

if (DesignMode)
{

this.components.Add(new Common.Windows.AppColorSchemeExtender(), "_appColorSchemeExtender");

}

Does anyone know what I am doing wrong



Answer this question

Adding an IExtenderProvider to a custom base Form

  • Adding an IExtenderProvider to a custom base Form