Native binding and class outlets

rjmrjm CAMember ✭✭✭
edited February 2013 in Xamarin.iOS

I'm trying to create a binding for a native control. It's header file looks a little like this:

@interface RMCustomControl : NSControl {
    IBOutlet id partnerView;
}

- (id)partnerView;
- (void)setPartnerView:(id)view;

@end

Because of the IBOutlet, I see the partnerView outlet in Interface Builder and I can hook it up:

Now - how do I create a binding for that to get the same behaviour in MonoMac?

My generated C# looks like this:

[Export ("partnerView")]
NSObject PartnerView { get; set; }

OK, so the property is there; but how do I define the outlet? So it can be seen in Interface Builder the same way?

Or will this simply not work, and I need to create my connections in code when using a bound native control in my MonoMac app?

Thanks!

Posts

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    You shouldn't need the Outlet in a binding. The binding you've got looks correct, afaict.

  • rjmrjm CAMember ✭✭✭

    Thank you. Of course, you're right and it's not needed... Thanks again.

Sign In or Register to comment.