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...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer (show other bugs)
Version: 7.4 (15.3)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.5
Assignee: Bret Johnson [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-09-08 17:58 UTC by Jon Douglas [MSFT]
Modified: 2017-11-14 10:08 UTC (History)
3 users (show)

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


Attachments

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

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":

https://i.imgur.com/76EX8U6.png

Changing back and forth between Source -> Designer:

https://i.imgur.com/IgLRi1E.png

*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

Xamarin 4.6.0.299
Xamarin.Android 7.4.0.21
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.
Comment 5 Bret Johnson [MSFT] 2017-10-20 04:12:05 UTC
Fixed, via https://github.com/xamarin/designer/pull/266
Comment 6 Sarang Kanchalwar 2017-11-14 10:08:20 UTC
I have tested the bug with d15-5 preview 4 build. The issue is seems to be fixed.

I have not done a thorough investigation, but it seems all controls I've tested have expected behavior i.e. only one control adding at one attempt. Controls tested so far -Button, ImageView, TextView, Spinner, etc.

Buid Info:
Microsoft Visual Studio Enterprise 2017 
Version 15.5.0 [27109.1.d15rel]
VisualStudio.15.Release.Int/15.5.0+27109.1.d15rel
Microsoft .NET Framework
Version 4.7.02046
Installed Version: Enterprise

Xamarin   4.8.0.744 (a773aca)
Xamarin Designer   4.8.152 (5e0da2967)
Xamarin.Android SDK   8.1.0.23 (HEAD/f65f87747)
Xamarin.iOS and Xamarin.Mac SDK   11.4.0.214 (c4240f3)

Complete Build Details:
https://gist.github.com/ksarang2009/19de7d82d10e8d51545d8f31c541840d

Screencast:
https://www.screencast.com/t/PHABG33swz

Hence marking the bug as verified.

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