Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit c99c2c0

Browse files
authored
Added repro sample (#13704)
1 parent 0b5d2ee commit c99c2c0

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<local:TestContentPage
3+
xmlns="http://xamarin.com/schemas/2014/forms"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5+
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
6+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7+
mc:Ignorable="d"
8+
Title="Test 13684" xmlns:local="using:Xamarin.Forms.Controls"
9+
x:Class="Xamarin.Forms.Controls.Issues.Issue13684">
10+
<StackLayout>
11+
<Label
12+
Padding="12"
13+
BackgroundColor="Black"
14+
TextColor="White"
15+
Text="If the text of each item has two lines in addition to do tail truncation, the test has passed."/>
16+
<CollectionView>
17+
<CollectionView.ItemsSource>
18+
<x:Array Type="{x:Type x:String}">
19+
<x:String>1. Some very very very very very very very very very long text two ...</x:String>
20+
<x:String>2. Some very very very very very very very very very long text two ...</x:String>
21+
<x:String>3. Some very very very very very very very very very long text two ...</x:String>
22+
</x:Array>
23+
</CollectionView.ItemsSource>
24+
<CollectionView.ItemsLayout>
25+
<LinearItemsLayout
26+
Orientation="Horizontal"
27+
ItemSpacing="0" />
28+
</CollectionView.ItemsLayout>
29+
<CollectionView.ItemTemplate>
30+
<DataTemplate>
31+
<Grid>
32+
<Grid.RowDefinitions>
33+
<RowDefinition Height="170" />
34+
<RowDefinition Height="*" />
35+
</Grid.RowDefinitions>
36+
<Grid.ColumnDefinitions>
37+
<ColumnDefinition Width="170" />
38+
</Grid.ColumnDefinitions>
39+
<Ellipse
40+
Grid.Row="0"
41+
Fill="#DBEAEC"
42+
WidthRequest="150"
43+
HeightRequest="150"
44+
HorizontalOptions="Center"
45+
VerticalOptions="Center"
46+
Margin="15, 0, 5, 0"
47+
StrokeThickness="0"/>
48+
<Label
49+
Grid.Row="1"
50+
Text="{Binding}"
51+
HorizontalTextAlignment="Center"
52+
FontSize="20"
53+
VerticalOptions="Start"
54+
Margin="15, 0, 5, 0"
55+
MaxLines="2"
56+
LineBreakMode="TailTruncation" />
57+
</Grid>
58+
</DataTemplate>
59+
</CollectionView.ItemTemplate>
60+
</CollectionView>
61+
</StackLayout>
62+
</local:TestContentPage>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Collections.ObjectModel;
4+
using Xamarin.Forms.CustomAttributes;
5+
6+
#if UITEST
7+
using Xamarin.UITest;
8+
using NUnit.Framework;
9+
using Xamarin.Forms.Core.UITests;
10+
#endif
11+
12+
namespace Xamarin.Forms.Controls.Issues
13+
{
14+
[Issue(IssueTracker.Github, 13684,
15+
"[Bug] Label: LineBreakMode incompatible with MaxLines",
16+
PlatformAffected.Android)]
17+
public partial class Issue13684 : TestContentPage
18+
{
19+
public Issue13684()
20+
{
21+
#if APP
22+
InitializeComponent();
23+
#endif
24+
}
25+
26+
protected override void Init()
27+
{
28+
}
29+
}
30+
}

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,7 @@
17301730
<Compile Include="$(MSBuildThisFileDirectory)Issue8701.cs" />
17311731
<Compile Include="$(MSBuildThisFileDirectory)Issue13390.cs" />
17321732
<Compile Include="$(MSBuildThisFileDirectory)Issue13616.xaml.cs" />
1733+
<Compile Include="$(MSBuildThisFileDirectory)Issue13684.xaml.cs" />
17331734
</ItemGroup>
17341735
<ItemGroup>
17351736
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">
@@ -2138,6 +2139,9 @@
21382139
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue13616.xaml">
21392140
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
21402141
</EmbeddedResource>
2142+
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue13684.xaml">
2143+
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
2144+
</EmbeddedResource>
21412145
</ItemGroup>
21422146
<ItemGroup>
21432147
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla27417Xaml.xaml">

0 commit comments

Comments
 (0)