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-13 10:47:12 +00:00
|
|
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
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}" />
|
|
|
|
|
|
|
|
</Page.Resources>
|
|
|
|
|
|
|
|
<Grid>
|
2024-08-08 09:29:19 +00:00
|
|
|
<Grid.ColumnDefinitions>
|
2024-08-13 10:47:12 +00:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2024-08-08 09:29:19 +00:00
|
|
|
<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
|
2024-08-13 10:47:12 +00:00
|
|
|
x:Name="scrollview"
|
2024-08-09 07:05:40 +00:00
|
|
|
Grid.Row="2"
|
|
|
|
Grid.Column="0"
|
|
|
|
Width="300"
|
|
|
|
Margin="0,9,0,6"
|
|
|
|
Padding="0,0,16,0"
|
2024-08-13 10:47:12 +00:00
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
|
VerticalScrollBarVisibility="Auto">
|
2024-08-09 07:05:40 +00:00
|
|
|
|
2024-08-13 10:47:12 +00:00
|
|
|
<controlpages:EditorTreeView
|
2024-08-09 07:05:40 +00:00
|
|
|
Name="treeView"
|
2024-08-13 10:47:12 +00:00
|
|
|
DoubleTapped="treeView_DoubleTapped"
|
2024-08-09 07:05:40 +00:00
|
|
|
ItemInvoked="TreeView_ItemInvoked"
|
|
|
|
ItemTemplateSelector="{StaticResource ExplorerItemTemplateSelector}"
|
|
|
|
ItemsSource="{x:Bind DataSource}"
|
2024-08-13 10:47:12 +00:00
|
|
|
ScrollViewer.IsVerticalRailEnabled="False"
|
2024-08-09 07:05:40 +00:00
|
|
|
SelectionMode="Single" />
|
|
|
|
</ScrollViewer>
|
|
|
|
|
2024-08-13 10:47:12 +00:00
|
|
|
<controls:PropertySizer
|
2024-08-11 11:16:42 +00:00
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="1"
|
2024-08-13 10:47:12 +00:00
|
|
|
Binding="{x:Bind scrollview.Width, Mode=TwoWay}"
|
|
|
|
Maximum="350"
|
|
|
|
Minimum="200"
|
|
|
|
Visibility="Visible" />
|
|
|
|
<Grid
|
|
|
|
x:Name="gridedit"
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="2">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TabView
|
|
|
|
x:Name="tabview"
|
|
|
|
Grid.Row="0"
|
|
|
|
Height="auto"
|
|
|
|
IsAddTabButtonVisible="False"
|
|
|
|
TabCloseRequested="TabView_TabCloseRequested"
|
|
|
|
TabItemsSource="{x:Bind TabViewList}" />
|
2024-08-11 11:16:42 +00:00
|
|
|
|
2024-08-13 10:47:12 +00:00
|
|
|
</Grid>
|
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>
|