I'm trying to take a WinTable object and cast it to its native object type as such:
CustomControl control = (CustomControl) this.UIMap.UIMainWindow.UICustomControl.NativeElement;
Then I want to treat the resulting CustomControl
as I would in the source code for my program like control.DoAThing()
, I have already referenced the .dll containing the CustomControl
class but the problem is that .NativeElement;
is returning a type Object[]
rather than an Object
like the definition of the function says it should.
Is .NativeElement
the way to go or am I misunderstanding its purpose?
UPDATE: I checked the types of the objects in the resulting Object[]
and the first one is of type System.__ComObject
and the 2nd is System.Int32
but I'm not sure what either of these represent...
.NativeElement
isn't supposed to do what you expect it to. What isCustomControl
? Did you write that class yourself? – Fryer