File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
tests/MaterialDesignThemes.UITests/WPF/TabControls Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -152,4 +152,56 @@ public async Task TabControl_ShouldRespectSelectedContentTemplate_WhenSetDirectl
152152
153153 recorder . Success ( ) ;
154154 }
155+
156+ [ Test ]
157+ public async Task ScrollingTabs_UniformGrid ( )
158+ {
159+ await using var recorder = new TestRecorder ( App ) ;
160+
161+ //Arrange
162+ const int numTabs = 10 ;
163+ StringBuilder xaml = new ( "<TabControl>" ) ;
164+ for ( int i = 1 ; i <= numTabs ; i ++ )
165+ {
166+ xaml . Append ( $ """
167+ <TabItem Header="TAB { i } ">
168+ <TextBlock Margin="8" Text="Tab { i } " />
169+ </TabItem>
170+ """ ) ;
171+ }
172+ xaml . Append ( "</TabControl>" ) ;
173+ IVisualElement < TabControl > tabControl = await LoadXaml < TabControl > ( xaml . ToString ( ) ) ;
174+
175+ //Act
176+
177+ //Assert
178+
179+ recorder . Success ( ) ;
180+ }
181+
182+ [ Test ]
183+ public async Task ScrollingTabs_VirtualizingStackPanel ( )
184+ {
185+ await using var recorder = new TestRecorder ( App ) ;
186+
187+ //Arrange
188+ const int numTabs = 10 ;
189+ StringBuilder xaml = new ( "<TabControl HorizontalContentAlignment=\" Left\" >" ) ;
190+ for ( int i = 1 ; i <= numTabs ; i ++ )
191+ {
192+ xaml . Append ( $ """
193+ <TabItem Header="TAB { i } ">
194+ <TextBlock Margin="8" Text="Tab { i } " />
195+ </TabItem>
196+ """ ) ;
197+ }
198+ xaml . Append ( "</TabControl>" ) ;
199+ IVisualElement < TabControl > tabControl = await LoadXaml < TabControl > ( xaml . ToString ( ) ) ;
200+
201+ //Act
202+
203+ //Assert
204+
205+ recorder . Success ( ) ;
206+ }
155207}
You can’t perform that action at this time.
0 commit comments