@@ -5,11 +5,11 @@ namespace Controls.TestCases.HostApp.Issues;
5
5
[ Issue ( IssueTracker . Github , 7144 , "IndicatorView using templated icons not working" , PlatformAffected . UWP ) ]
6
6
public class Issue7144 : ContentPage
7
7
{
8
- public ObservableCollection < Issue7144Monkey > Monkeys { get ; set ; } = new ObservableCollection < Issue7144Monkey > ( ) ;
8
+ public ObservableCollection < string > Items { get ; set ; } = new ObservableCollection < string > ( ) { "Items1" , "Items2" } ;
9
9
10
10
public Issue7144 ( )
11
11
{
12
- CreateMonkeyCollection ( ) ;
12
+ // CreateMonkeyCollection();
13
13
14
14
Grid grid = new Grid ( ) ;
15
15
grid . RowDefinitions . Add ( new RowDefinition { Height = GridLength . Star } ) ;
@@ -35,78 +35,79 @@ public Issue7144()
35
35
return image ;
36
36
} ) ;
37
37
38
- CarouselView carouselViewWithIndicatorView = new CarouselView
38
+ CarouselView carouselView = new CarouselView
39
39
{
40
- ItemsSource = Monkeys ,
40
+ ItemsSource = Items ,
41
41
Loop = false ,
42
42
IndicatorView = indicatorViewWithDataTemplate ,
43
43
ItemTemplate = new DataTemplate ( ( ) =>
44
44
{
45
45
StackLayout stackLayout = new StackLayout ( ) ;
46
46
47
- Label nameLabel = new Label
47
+ Label label = new Label
48
48
{
49
49
FontAttributes = FontAttributes . Bold ,
50
50
FontSize = 24 ,
51
51
HorizontalOptions = LayoutOptions . Center ,
52
52
VerticalOptions = LayoutOptions . Center
53
53
} ;
54
- nameLabel . SetBinding ( Label . TextProperty , "Name " ) ;
54
+ label . SetBinding ( Label . TextProperty , ". " ) ;
55
55
56
- Image image = new Image
57
- {
58
- Aspect = Aspect . Fill ,
59
- HeightRequest = 150 ,
60
- WidthRequest = 150 ,
61
- HorizontalOptions = LayoutOptions . Center
62
- } ;
63
- image . SetBinding ( Image . SourceProperty , "Image" ) ;
56
+ // Image image = new Image
57
+ // {
58
+ // Aspect = Aspect.Fill,
59
+ // HeightRequest = 150,
60
+ // WidthRequest = 150,
61
+ // HorizontalOptions = LayoutOptions.Center
62
+ // };
63
+ // image.SetBinding(Image.SourceProperty, "Image");
64
64
65
- stackLayout . Children . Add ( nameLabel ) ;
66
- stackLayout . Children . Add ( image ) ;
65
+ stackLayout . Children . Add ( label ) ;
66
+ // stackLayout.Children.Add(image);
67
67
68
68
return stackLayout ;
69
+
69
70
} )
70
71
} ;
71
72
72
73
Label label = new Label
73
74
{
74
- AutomationId = "IndicatorViewWithDataTemplate " ,
75
+ AutomationId = "descriptionLabel " ,
75
76
Text = "The test case fails if the IndicatorView DataTemplate is not displayed" ,
76
77
FontAttributes = FontAttributes . Bold ,
77
78
FontSize = 24 ,
78
79
HorizontalOptions = LayoutOptions . Center ,
79
80
VerticalOptions = LayoutOptions . Center
80
81
} ;
81
82
82
- grid . Add ( carouselViewWithIndicatorView , 0 , 0 ) ;
83
+ grid . Add ( carouselView , 0 , 0 ) ;
83
84
grid . Add ( indicatorViewWithDataTemplate , 0 , 1 ) ;
84
85
grid . Add ( label , 0 , 2 ) ;
85
86
86
87
Content = grid ;
87
88
}
88
89
89
- void CreateMonkeyCollection ( )
90
- {
91
- Monkeys . Add ( new Issue7144Monkey
92
- {
93
- Name = "Baboon" ,
94
- Image = "dotnet_bot.png"
95
- } ) ;
96
-
97
- Monkeys . Add ( new Issue7144Monkey
98
- {
99
- Name = "Capuchin Monkey" ,
100
- Image = "dotnet_bot.png"
101
- } ) ;
102
- }
90
+ // void CreateMonkeyCollection()
91
+ // {
92
+ // Monkeys.Add(new Issue7144Monkey
93
+ // {
94
+ // Name = "Baboon",
95
+ // Image = "dotnet_bot.png"
96
+ // });
97
+
98
+ // Monkeys.Add(new Issue7144Monkey
99
+ // {
100
+ // Name = "Capuchin Monkey",
101
+ // Image = "dotnet_bot.png"
102
+ // });
103
+ // }
103
104
}
104
105
105
- public class Issue7144Monkey
106
- {
107
- public string Name { get ; set ; }
106
+ // public class Issue7144Monkey
107
+ // {
108
+ // public string Name { get; set; }
108
109
109
- public string Image { get ; set ; }
110
- }
110
+ // public string Image { get; set; }
111
+ // }
111
112
112
113
0 commit comments