2024-08-08 09:29:19 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<windowex:WindowEx
|
|
|
|
x:Class="RustTools.Editor.EditorWin"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-08-09 07:05:40 +00:00
|
|
|
xmlns:controlpages="using:RustTools.Editor"
|
2024-08-08 09:29:19 +00:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:local="using:RustTools"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:windowex="using:WinUIEx"
|
|
|
|
MinWidth="500"
|
|
|
|
MinHeight="500"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
2024-08-09 07:05:40 +00:00
|
|
|
<Page Name="page">
|
|
|
|
<Page.Resources>
|
|
|
|
<DataTemplate x:Key="FolderTemplate">
|
|
|
|
<TreeViewItem
|
|
|
|
AutomationProperties.Name="{Binding Name}"
|
|
|
|
IsExpanded="False"
|
|
|
|
ItemsSource="{Binding Children}">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<FontIcon Glyph="" />
|
|
|
|
<TextBlock Margin="0,0,10,0" />
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
</StackPanel>
|
|
|
|
</TreeViewItem>
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate x:Key="FileTemplate">
|
|
|
|
<TreeViewItem AutomationProperties.Name="{Binding Name}">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<FontIcon Glyph="" />
|
|
|
|
<TextBlock Margin="0,0,10,0" />
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
</StackPanel>
|
|
|
|
</TreeViewItem>
|
|
|
|
</DataTemplate>
|
|
|
|
<controlpages:ExplorerItemTemplateSelector
|
|
|
|
x:Key="ExplorerItemTemplateSelector"
|
|
|
|
FileTemplate="{StaticResource FileTemplate}"
|
|
|
|
FolderTemplate="{StaticResource FolderTemplate}" />
|
|
|
|
|
|
|
|
<TabViewItem x:Key="FileTab">
|
|
|
|
<TextBox
|
|
|
|
x:Name="MyTextBox"
|
|
|
|
Height="200"
|
|
|
|
AcceptsReturn="True"
|
|
|
|
TextWrapping="Wrap" />
|
|
|
|
</TabViewItem>
|
|
|
|
</Page.Resources>
|
|
|
|
|
|
|
|
<Grid>
|
2024-08-08 09:29:19 +00:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
2024-08-09 07:05:40 +00:00
|
|
|
<ColumnDefinition Width="*" />
|
2024-08-08 09:29:19 +00:00
|
|
|
</Grid.ColumnDefinitions>
|
2024-08-09 07:05:40 +00:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid
|
|
|
|
Grid.Row="0"
|
|
|
|
Padding="9"
|
|
|
|
Visibility="Visible">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
|
|
Name="TitleText"
|
|
|
|
Grid.Column="0"
|
|
|
|
Margin="16,0,0,0" />
|
|
|
|
</Grid>
|
|
|
|
<ScrollViewer
|
|
|
|
Grid.Row="2"
|
|
|
|
Grid.Column="0"
|
|
|
|
Width="300"
|
|
|
|
Margin="0,9,0,6"
|
|
|
|
Padding="0,0,16,0"
|
|
|
|
HorizontalScrollBarVisibility="Visible"
|
|
|
|
HorizontalScrollMode="Auto"
|
|
|
|
IsHorizontalRailEnabled="True"
|
|
|
|
IsHorizontalScrollChainingEnabled="True">
|
|
|
|
|
|
|
|
<TreeView
|
|
|
|
Name="treeView"
|
|
|
|
Grid.Row="2"
|
|
|
|
Grid.Column="0"
|
|
|
|
ItemInvoked="TreeView_ItemInvoked"
|
|
|
|
ItemTemplateSelector="{StaticResource ExplorerItemTemplateSelector}"
|
|
|
|
ItemsSource="{x:Bind DataSource}"
|
|
|
|
KeyDown="treeView_KeyDown"
|
|
|
|
KeyUp="treeView_KeyUp"
|
|
|
|
SelectionMode="Single" />
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
<Grid Grid.Row="1" Grid.Column="1" />
|
2024-08-08 09:29:19 +00:00
|
|
|
</Grid>
|
2024-08-09 07:05:40 +00:00
|
|
|
</Page>
|
2024-08-08 09:29:19 +00:00
|
|
|
</windowex:WindowEx>
|