Bug 22507 - Visual Studio - Android AXML - Switching from Design to Source code resets position in code
Summary: Visual Studio - Android AXML - Switching from Design to Source code resets po...
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer ()
Version: 3.5
Hardware: PC Windows
: Low minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-29 10:47 UTC by Dominic N [MSFT]
Modified: 2017-07-11 17:56 UTC (History)
6 users (show)

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

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 for Bug 22507 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Dominic N [MSFT] 2014-08-29 10:47:52 UTC
There is an issue when working on .axml files in Xamarin.Android projects in Visual Studio only.

When switching from the "Design" tab to the "Source" tab, the source view resets to the top of the file and the original cursor position is lost. The bug also occurs on all subsequent switches from the designer view to the source code view.


## Steps to Reproduce:

1. Create a new Xamarin.Android project in Visual Studio. 

2. Edit the .axml source for the project by hand so that there’s enough text to necessitate a scroll bar (the default button can be copied over multiple times to achieve this if necessary).

3. Scroll down and position the cursor at the bottom of the source code.

4. Switch from the source code view to the designer view.

5. Switch back to the source code view.


## Actual Results:

The scroll position of the "Source" tab resets to the top of the file; the cursor position resets to the bottom of the file.


## Expected Results:

Neither the scroll position nor the cursor position should change. Both should remain at the locations chosen during step 3. Xamarin Studio has the correct behavior (tested on version 5.3 (build 439)).


## Version Information:

Xamarin   3.5.55.0 (2db5ccd228887372e207e112bc3b5f1b16b24293)

Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.51641

Windows 8.1 64-bit (in VMWare Fusion 6.0.4)