Bug 59355 - Adding a control to a ViewGroup in the Document Outline creates two visual controls on the designer surface/xml.
Summary: Adding a control to a ViewGroup in the Document Outline creates two visual co...
Alias: None
Product: Android
Classification: Xamarin
Component: Designer (show other bugs)
Version: 7.4 (15.3)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.6
Assignee: Bret Johnson [MSFT]
Depends on:
Reported: 2017-09-08 17:58 UTC by Jon Douglas [MSFT]
Modified: 2017-10-13 02:22 UTC (History)
2 users (show)

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


Description Jon Douglas [MSFT] 2017-09-08 17:58:01 UTC

When adding a control from the Toolbox to the Document Outline window, the designer surface visually shows two instances of the control. If you then go to look at the Source tab, you will see two instances of the control as well. You can also trigger this by going to a different tab such as the MainActivity.cs and going back to the Main.axml file.

Adding an "ImageView" to a "LinearLayout":


Changing back and forth between Source -> Designer:


*Reproduction Steps:

1. Create a File->New Xamarin.Android Project
2. Open up the Main.axml file in the designer
3. Open up the toolbox and Document Outline windows
4. Add any control from the toolbox to the document outline into a viewgroup such as a LinearLayout.

I have not done a thorough investigation, but it seems all controls I've tested have this behavior. (ImageView, TextView, Spinner, etc)

*Version Information:

Visual Studio 15.3.3

Comment 1 Jérémie Laval 2017-09-20 21:17:00 UTC
I cannot reproduce issue on master (https://www.screencast.com/t/ApKlTPzeasw), however for me the outline window does behave strangely where the first item seems to disappear when a new one is dropped.

@Bret, could you double check this one?
Comment 3 Bret Johnson [MSFT] 2017-10-07 07:16:19 UTC
Update: I haven't been able to repro this, on master. I'll get with Jon and we'll go thru the steps together.
Comment 4 Bret Johnson [MSFT] 2017-10-13 02:22:45 UTC
Another update: I was eventually able to repro.  https://github.com/xamarin/designer/pull/243 should fix it.

Note You need to log in before you can comment on or make changes to this bug.