That should work. I tend to make a normal cell and inject things into the ContentView, but I suspect yours is cleaner and the "better" way. My "way" dates back 12-24 months, so.... better tricks may have come up since then.
The MWC app might be a good place to look: https://github.com/xamarin/mobile-samples/tree/master/MWC/MWC.iOS/UI/CustomElements .. as it's fairly recent. On Tue, Jul 10, 2012 at 11:08 AM, Phil Cockfield <[email protected]> wrote: > Thanks *Nic*, > > So something like this(?): > > https://gist.github.com/3082446 > > > If you're going of *Element*, you don't have a *UIView *to play with, > right? I'm not sure if going all the way to Element is too low-level for > me - but if I want complete rendering control, I think I need to. > > In the gist I have to create my own *TableViewCell*. Is this in the > weeks, or the right way to do things? I suspect that this could be more > efficient, given the warnings about cell's not being recycled when using > the *UIViewElement.* > > From the docs: > > *UIViewElement > * > Can we used to host a standard UIView as an element, in this case no cell > reuse will take place. > > > > > > On Tue, Jul 10, 2012 at 7:12 PM, Nic Wise <[email protected]> wrote: > >> Yup, thats what I do: inherit off Element (or something a little further >> down the stack) and add my own stuff into the view >> >> yell for code. :) >> >> On Tue, Jul 10, 2012 at 6:31 AM, Phil Cockfield <[email protected]>wrote: >> >>> I just found this by Miguel: >>> >>> >>> http://stackoverflow.com/questions/4028356/monotouch-dialogs-ownerdrawnelement-highlight-not-working >>> >>> The OwnerDrawnElement was a contribution from the community, and it is >>> not as sophisticated as it should be. I would not depend on it for anything >>> beyond the trivially basic. >>> >>> I strongly recommend that you create your own Element, if you want to >>> reuse some of the code for OwnerDrawElement, you could copy and paste that. >>> >>> >>> So perhaps I should be just deriving from *Element* and overriding * >>> GetCell*. Is that too low-level? >>> What's the best practice here? >>> >>> Thanks! >>> >>> >>> >>> On Tue, Jul 10, 2012 at 2:27 PM, Phil Cockfield <[email protected]>wrote: >>> >>>> When wanting to get in and totally control cell style rendering, is >>>> there a preferred approach between these two options: >>>> >>>> - OwnerDrawnElement >>>> - UIViewElement >>>> >>>> For [UIViewElement] the docs say : "Can we used to host a standard >>>> UIView as an element, in this case no cell reuse will take place." >>>> >>>> That sounds bad. What I'm not experienced enough to know. What are >>>> people preferring to do when they want to render custom stuff? >>>> UIViewElement sounds easier. Is it like doing a bargain with the >>>> devil? >>>> >>>> Thanks. >>>> -- >>>> Phil Cockfield >>>> >>> >>> >>> >>> -- >>> *Phil *Cockfield >>> >>> >>> >>> >>> _______________________________________________ >>> MonoTouch mailing list >>> [email protected] >>> http://lists.ximian.com/mailman/listinfo/monotouch >>> >>> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise >> b. http://www.fastchicken.co.nz/ >> >> Earnest: Self-employed? Track your business expenses and income. >> http://earnestapp.com >> Nearest Bus: find when the next bus is coming to your stop. >> http://goo.gl/Vcz1p >> mobileAgent (for FreeAgent): get your accounts in your pocket. >> http://goo.gl/IuBU >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa >> London Bike App: Find the nearest Boris Bike, and get riding! >> http://goo.gl/Icp2 >> >> > > > -- > *Phil *Cockfield > > > > -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
