Bug 49820 - Bug in Tab control
Summary: Bug in Tab control
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-12-13 14:45 UTC by Carles
Modified: 2017-06-19 19:10 UTC (History)
3 users (show)

Tags: tab control, forms
Is this bug a regression?: ---
Last known good build:


Attachments
Test project (294.47 KB, application/x-gzip)
2017-01-09 15:15 UTC, Carles
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 INVALID

Description Carles 2016-12-13 14:45:27 UTC
Hello,

I've just noticed a bug in the TabControl.
I've an empty control created in design time to which I'm adding pages programmatically.
Once I add the first page using this:

this.myTabControl.TabPages.Add("my title");

I get an exception: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index."

This message is got by my try-catch structure. I've no image list associated, no SelectedItem and this is the very first tab added.

in the form, I'm being asked for the version, but I don't know if you refer to the version of Mono, libmono, XamarinForms, etc. As a reference I'm using Linux Mint 32bit 14.04 trusty (Ubuntu 14.04.5 LTS) and I've just performed "apt-get update" + "apt-get upgrade".

Let me know if you would need any additional information.

Best regards,
Carles
Comment 1 Paul DiPietro [MSFT] 2016-12-30 16:56:13 UTC
Could you please upload a reproduction project? The version refers to the version of Forms being used.
Comment 2 Carles 2017-01-09 15:15:18 UTC
Created attachment 19130 [details]
Test project

Here is a demo project where the error appears. It has been generated from a trimmed version of a much bigger project.
Comment 3 Carles 2017-02-06 15:24:02 UTC
Any new on this?
Was anybody able to reproduce the error with the attached demo project?
Comment 4 Paul DiPietro [MSFT] 2017-06-19 19:10:38 UTC
This is a WinForms issue, not Xamarin.Forms.