Bug 4827 - Monotouch Dialog, Root Element with more than one Section, IndexSource
Summary: Monotouch Dialog, Root Element with more than one Section, IndexSource
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-02 13:50 UTC by matteo.polito
Modified: 2012-05-13 05:32 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A modified version of DemoOwnerDrawnElement included on Monotouch.Dialog sample application (8.57 KB, application/octet-stream)
2012-05-02 13:50 UTC, matteo.polito
Details
AppDelegate.cs (10.98 KB, application/octet-stream)
2012-05-11 08:42 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description matteo.polito 2012-05-02 13:50:35 UTC
Created attachment 1795 [details]
A modified version of DemoOwnerDrawnElement included on Monotouch.Dialog sample application

There is a bug on Monotouch Dialog. 
If I want to show a tableview with a custom UITableViewCell and RootElement with more than one Section and IndexSource this is what happen: 

http://desmond.imageshack.us/Himg804/scaled.php?server=804&filename=screenshot20120502at193.jpg&res=landing

Is visible a white box on the right side. I've tried to remove it but seems that it has the same size of IndexSource and I can't remove it!!!
I attach the source file to try this problem. 
To run it copy on Monotouch Dialog Sample application.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-05-11 08:42:33 UTC
Created attachment 1859 [details]
AppDelegate.cs

This is because the owner-drawn area is the content area only. You're trying to change the background of the entire cell, so you need to set the cell's BackgroundView property.

I'm attaching a modified version of your AppDelegate.cs that shows how to do this, in particular look at the new OwnerDrawnCellBackgroundView class, which is used in the Source's GetCell override.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-05-11 08:42:56 UTC
Closing.
Comment 3 matteo.polito 2012-05-13 05:32:05 UTC
Thanks, it's perfect! :D