aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Experimental/tabviewWithScrollTabName.crow
blob: 6fc5ba47352c6c6d359b4bdcb219b78f8046ba36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<TabView Orientation="Horizontal">
	<Template>
		<VerticalStack Spacing="0" Background="{./Background}"> 
			<ListBox  Data="{./Items}" Height="Fit" HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{²./SelectedItem}"> 
				<Template>
					<VerticalStack Spacing="0" >
						<ScrollBar Orientation="Horizontal" Foreground="RoyalBlue" Height="6" Width="Stretched" CornerRadius="3"
							Value="{²../ItemsScroller.ScrollX}"
							LargeIncrement="{../ItemsScroller.PageWidth}" SmallIncrement="1"
							CursorRatio="{../ItemsScroller.ChildWidthRatio}" Maximum="{../ItemsScroller.MaxScrollX}">
							<Template>
								<Container Margin="1" Background="{./Background}">
									<Widget Name="Cursor" Background="{./Foreground}" CornerRadius="{./CornerRadius}"/>
								</Container>
							</Template>
						</ScrollBar>
						<Scroller Name="ItemsScroller"  >
							<HorizontalStack Width="Fit" Name="ItemsContainer" HorizontalAlignment="Left"/>
						</Scroller>
					</VerticalStack>
				</Template>
				<ItemTemplate>
					<ListItem Fit="true" Background="${InactiveTabItem}" IsSelected="{IsVisible}" Margin="5"
							Selected="{.DataSource.Visible='true'};{Background=.DataSource.Background}"
							Unselected="{.DataSource.Visible='false'};{Background=${InactiveTabItem}}"> 
						<Label Text="{Name}" Width="200" />
					</ListItem>
				</ItemTemplate>
			</ListBox>
			<Group Name="ItemsContainer" />
		</VerticalStack>
	</Template>
	<GroupBox Name="item 1" Caption="item 1" IsVisible="true" Background="Violet"/>			
	<GroupBox Name="item 2" Caption="item 2" IsVisible="false" Background="CornflowerBlue"/>
	<GroupBox Name="item 3" Caption="item 3" IsVisible="false" Background="Red"/>
	<GroupBox Name="item 4" Caption="item 4" IsVisible="false" Background="Green"/>
	<GroupBox Name="item 5" Caption="item 5" IsVisible="false" Background="Brown"/>
	<GroupBox Name="item 6" Caption="item 6" IsVisible="false" Background="RoyalBlue"/>
	<GroupBox Name="item 7" Caption="item 7" IsVisible="false" Background="Yellow"/>
</TabView>