Bug 42633 - [xamu] Unable to paste line breaks into UILabel Text property
Summary: [xamu] Unable to paste line breaks into UILabel Text property
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.2.0 (C8)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Dmitry Petrishin
URL:
Depends on:
Blocks:
 
Reported: 2016-07-18 15:41 UTC by Adam Patridge [MSFT]
Modified: 2018-01-25 13:34 UTC (History)
7 users (show)

Tags: ac vs
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 on Developer Community 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 NOT_REPRODUCIBLE

Description Adam Patridge [MSFT] 2016-07-18 15:41:42 UTC
Whenever I try to paste multi-line text into a UILabel's Text field in the Properties pad, it truncates to the first line. The identical paste in the Xamarin Studio [v6.0.1] iOS Designer takes multi-line content when pasted in just fine (but hitting enter inside the field doesn't add a line break).

Steps:
1. New iOS Single View App
2. Open Main.storyboard
3. Drag on a label
4. Switch Lines property to 0 (to see word wrapping)
4. Try to paste in multiple lines of text into the Text field

Results:
The label will have its text set to the first line of text; the remaining text will be missing.

Expected:
The label should have all the copied lines of text.

Workaround:
Opening the Main.storyboard file in another editor (e.g., VS Code) and pasting the text directly into the Label's `<string key="text">` field will be reflected in the iOS Designer the next time it is opened.
Comment 1 Ben Beckley 2017-07-07 18:10:20 UTC
Thanks so much for taking the time to submit this report! I can confirm using the latest Visual Studio 15.3 preview builds I am able to reproduce this issue. Marking this report as CONFIRMED.
Comment 2 Kent Green [MSFT] 2017-07-13 00:41:31 UTC
I've tested this issue and I am not able to reproduce it in Visual Studio for Mac. When pasting multiline text into the properties pane; text is only cut off if it exceeds the available length of the label; and not if it is simply multi-line.

=== Visual Studio Community 2017 for Mac (Preview) ===

Version 7.1 Preview (7.1 build 583)
Installation UUID: 42f9117b-22e2-4aaa-8fa1-535faf6d64a4
Runtime:
	Mono 5.2.0.104 (2017-04/4a0006f) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000104

=== NuGet ===

Version: 4.0.0.2323

=== .NET Core ===

Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: 10.11.0.126 (Visual Studio Community)
Hash: 7571635e
Branch: master
Build date: 2017-05-09 16:04:54-0400

=== Xamarin.Android ===

Version: 7.3.1.2 (Visual Studio Community)
Android SDK: /Users/kentgreen/Library/Android/sdk
	Supported Android versions:
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.0

Java SDK: /usr
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.3.0-alpha2
Hash: fa030e0
Branch: master
Build date: Thu, 01 Jun 2017 20:55:26 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: 3.5.0.126 (Visual Studio Community)

=== Build Information ===

Release ID: 701000583
Git revision: 445a7f09feca58babb966e0c66a6b299d0bd450c
Build date: 2017-05-12 16:05:38-04
Xamarin addins: f9b72ca5f6ca5d9476d8f58353ada2afd56c549b
Build lane: monodevelop-lion-d15-3-preview

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64