Search code examples
c#asp.netdundas

Is it possible to extend a dundas chart control using a partial class?


Is it possible to extend a dundas chart control or any other propietary (binary distributed) control(s) where we don't have the sources using partial classes?

I thought it could be done as long as the dll was referenced, but I've been struggling trying to find a way of doing this.

I'm trying to avoid the creation of an ASP .NET Server Control which inherits from the Dundas.Charting.WebControl.Chart class.


Solution

  • No, to use a partial class the main declaration of that class must already use the partial keyword, usually not the case.

    Inheritance is possible if the class is not marked as sealed. You seem not to want that, but it could be the shortest path.

    The last option, but one that always works, is to embed the control in a Wrapper that extends its functionality.