I'm helping build a Xamarin.Mac based app, and I'm having trouble getting a custom control to work.
All of our screens have the same look and feel: header (title, subtitle), content area, footer with buttons.
After making the first screen, I thought I'd refactor, and turn the header and footer into controls, so I could re-use them, and just swap out the handlers for the button clicks, and expose the
StringValue properties from the
NSLabel's on the title and subtitle on the header.
So, I created a new
Cocoa View via the new file menu in Xamarin.Mac. I laid out the two
NSLabel's. Dropped a CustomView from the little toolbox area onto my screen. Set the class on it to
DialogHeader (the name of my header view).
Fire up the app, and nada. It appears that the
xib for the
DialogHeader view isn't associated with the class, because the class gets instantiated, and the
AwakeFromNib gets called, but the two
NSLabel's don't appear to ever get hydrated from the
Is this type of scenario supported? Does it sound like I'm just doing something wrong? Are there samples out there that do this type of thing? (I tried doing a similar thing as the Button Madness demo where I create the controls in code and drop them into their respective placeholders, but the
xib doesn't appear to be loaded in that scenario either.
Thanks in advance!