diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-05 18:32:18 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-05 18:32:18 +0200 |
| commit | b9e90a3df66f4bd8228c1246af830d7801ea57ba (patch) | |
| tree | 8de343d8341be621c4b5daa12899155e0bc2f26a /Tests/Interfaces/Unsorted/testTreeView.crow | |
| parent | e9963abca14fbad8ff6c215e5c9d6b45652b38dc (diff) | |
TreeView
template access with './', update all templates
binding path begining with '/' starts at current level
Diffstat (limited to 'Tests/Interfaces/Unsorted/testTreeView.crow')
| -rwxr-xr-x | Tests/Interfaces/Unsorted/testTreeView.crow | 67 |
1 files changed, 41 insertions, 26 deletions
diff --git a/Tests/Interfaces/Unsorted/testTreeView.crow b/Tests/Interfaces/Unsorted/testTreeView.crow index ca5ae138..5873e619 100755 --- a/Tests/Interfaces/Unsorted/testTreeView.crow +++ b/Tests/Interfaces/Unsorted/testTreeView.crow @@ -1,28 +1,43 @@ <?xml version="1.0"?> -<TreeView Height="90%" Width="90%" Data="{CurDirectory}"> - <ItemTemplate DataType="System.IO.FileInfo"> - <Label Text="{Name}" Width="Stretched"/> - </ItemTemplate> - <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos"> - <Expandable Caption="{Name}" > - <Template> - <VerticalStack Height="{../HeightPolicy}" Width="{../WidthPolicy}"> - <HorizontalStack Spacing="1" Height="Fit" Width="{../../WidthPolicy}"> - <Image Margin="2" Width="12" Height="12" - Visible="{../../../HasContent}" - Path="{../../../Image}" - SvgSub="{../../../IsExpanded}"/> - <Label Text="{../../../Caption}" Width="{../../../WidthPolicy}"/> - </HorizontalStack> - <Container Name="Content" Visible="false" - Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/> - </VerticalStack> - </Template> - <HorizontalStack Height="Fit" Width="{../WidthPolicy}"> - <GraphicObject Width="12" Height="10"/> - <ListBox Name="List" Height="Fit" Width="{../../WidthPolicy}" - Template="#Tests.Interfaces.treeList.crow" /> +<HorizontalStack> + <TreeView IsRoot="true" Name="treeView" Height="100%" Width="40%" Data="{CurDirectory}" Background="DimGray"> + <ItemTemplate DataType="System.IO.FileInfo"> + <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" > + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Images.Icons.file.svg"/> + <Label Text="{Name}" Width="Stretched" + MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}" + MouseLeave="{Background=Transparent}"/> </HorizontalStack> - </Expandable> - </ItemTemplate> -</TreeView>
\ No newline at end of file + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos"> + <Expandable Caption="{Name}" > + <Template> + <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}"> + <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}" + MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}" + MouseLeave="{Background=Transparent}"> + <Image Margin="2" Width="12" Height="12" + Visible="{./HasContent}" + Path="{./Image}" + SvgSub="{./IsExpanded}"/> + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Images.Icons.folder.svg"/> + <Label Text="{./Caption}" Width="{./WidthPolicy}"/> + </HorizontalStack> + <Container Name="Content" Visible="false" + Height="{./HeightPolicy}" Width="{./WidthPolicy}"/> + </VerticalStack> + </Template> + <HorizontalStack Height="Fit" Width="{./WidthPolicy}"> + <GraphicObject Width="12" Height="10"/> + <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}" + Template="#Tests.Interfaces.treeList.crow" /> + </HorizontalStack> + </Expandable> + </ItemTemplate> + </TreeView> + <Border Width="60%"> + <Label Text="{../../treeView.SelectedItem}"/> + </Border> +</HorizontalStack>
\ No newline at end of file |