aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Experimental/tabviewOrientation.crow
blob: 158cb16d94de98329b31b3c7039ef9ead4fb804d (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
<TabView Orientation="Horizontal">
	<Template>
		<GenericStack Orientation="{./OppositeOrientation}" Spacing="0" Background="{./Background}"> 
			<ListBox  Data="{./Items}" Fit="true" HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{²./SelectedItem}"> 
				<Template>
					<GenericStack Orientation="{../../../Orientation}" Name="ItemsContainer" />
				</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}" />
					</ListItem>
				</ItemTemplate>
			</ListBox>
			<Group Name="ItemsContainer" />
		</GenericStack>
	</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>