201 lines
12 KiB
XML
201 lines
12 KiB
XML
<UserControl x:Class="UnrealVS.FileBrowserWindowControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:vsshell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
|
|
Background="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBackgroundKey}}"
|
|
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="500"
|
|
Name="FileBrowser">
|
|
<UserControl.Resources>
|
|
<Style TargetType="TextBox">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsshell:VsBrushes.CommandBarTextActiveKey}}"/>
|
|
</Style>
|
|
<Style TargetType="ListBox">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="5" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBorderKey}}"/>
|
|
<Setter Property="Margin" Value="0,-6,0,0"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
</Style>
|
|
<Style TargetType="TabItem">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}"/>
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ListBoxItemVisualStyle}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabItem">
|
|
<Border Name="Border" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBorderKey}}" CornerRadius="2,2,0,0" Margin="1,2,2,2">
|
|
<ContentPresenter x:Name="ContentSite"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
ContentSource="Header"
|
|
Margin="10,3"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static vsshell:VsBrushes.WindowKey}}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
|
<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="{DynamicResource {x:Static vsshell:VsBrushes.FileTabInactiveTextKey}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ListBoxItemVisualStyle" TargetType="Control">
|
|
</Style>
|
|
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsshell:VsBrushes.CommandBarTextHoverKey}}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
<Border BorderBrush="Transparent" BorderThickness="0" Background="{TemplateBinding Background}">
|
|
<ContentPresenter>
|
|
<ContentPresenter.Resources>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Margin" Value="2"/>
|
|
</Style>
|
|
</ContentPresenter.Resources>
|
|
</ContentPresenter>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="true" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowTabMouseOverBackgroundBeginKey}}" />
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ListBoxItemVisualStyle}" />
|
|
</MultiTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding Path=Name}" Value="" />
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="Background" Value="{x:Null}" />
|
|
</MultiDataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBorderKey}}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Margin="13,16,13,0" Padding="5" BorderBrush="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBorderKey}}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="Filter:" Padding="3"/>
|
|
<TextBox Grid.Column="1" Name="FilterEditBox" CaretBrush="{DynamicResource {x:Static vsshell:VsBrushes.CommandBarTextActiveKey}}" Padding="3"/>
|
|
</Grid>
|
|
</Border>
|
|
<TabControl Name="FilesListTab" Grid.Row="1" IsTabStop="False" Background="Transparent" Margin="10" BorderBrush="Transparent">
|
|
<TabItem Header="All files" Name="AllFilesTab" Focusable="False">
|
|
<ListBox Name="AllFilesListBox">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=Name}" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</TabItem>
|
|
<TabItem Header="Bookmarked files" Name="BookmarkedFilesTab" Focusable="False">
|
|
<ListBox Name="BookmarkedFilesListBox">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=Name}" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</TabItem>
|
|
<TabItem Header="Recent files" Name="RecentFilesTab" Focusable="False">
|
|
<ListBox Name="RecentFilesListBox">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=Name}" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</TabItem>
|
|
</TabControl>
|
|
<Border Grid.Row="2" Margin="13,0,13,16" Padding="5" BorderBrush="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBorderKey}}">
|
|
<TextBox Name="StatusText" Text="" BorderThickness="0" IsReadOnly="True" IsTabStop="False"/>
|
|
</Border>
|
|
</Grid>
|
|
<Border Name="HelpDialog" BorderThickness="4" Width="auto" Height="auto" Visibility="Collapsed" Background="{DynamicResource {x:Static vsshell:VsBrushes.EditorExpansionFillKey}}" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<StackPanel Margin="20">
|
|
<TextBlock Text="Help (Press escape to close this popup)"/>
|
|
<StackPanel Margin="6">
|
|
<TextBlock Text="A file browser specialized for Unreal solutions. The browser is aware of .build.cs files"/>
|
|
<TextBlock Text="To filter the file browser, simply type words, separated by space."/>
|
|
</StackPanel>
|
|
<TextBlock Text=""/>
|
|
<TextBlock Text="Keys"/>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Margin="6">
|
|
<TextBlock Text="Escape"/>
|
|
<TextBlock Text="Enter"/>
|
|
<TextBlock Text="Up/Down"/>
|
|
<TextBlock Text="Left/right"/>
|
|
<TextBlock Text="Tab"/>
|
|
<TextBlock Text="Insert"/>
|
|
<TextBlock Text="Delete"/>
|
|
<TextBlock Text="F1"/>
|
|
<TextBlock Text="F5"/>
|
|
<TextBlock Text="Ctrl-I"/>
|
|
<TextBlock Text="Ctrl-Shift-I"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="6">
|
|
<TextBlock Text="- Close FileBrowser"/>
|
|
<TextBlock Text="- Open selected file"/>
|
|
<TextBlock Text="- Select file"/>
|
|
<TextBlock Text="- Move between all files list and bookmarked files list"/>
|
|
<TextBlock Text="- Toggle between filter edit box and file lists"/>
|
|
<TextBlock Text="- Insert bookmarked file"/>
|
|
<TextBlock Text="- Delete bookmarked file"/>
|
|
<TextBlock Text="- This help"/>
|
|
<TextBlock Text="- Refresh file lists with current visual studio solution"/>
|
|
<TextBlock Text="- Create a #include "file" statement to clipboard and close file browser"/>
|
|
<TextBlock Text="- Create a #include "file" statement and paste it into active document"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
<TextBlock Text=""/>
|
|
<TextBlock Text="Bookmarks"/>
|
|
<StackPanel Margin="6">
|
|
<TextBlock Text="Can be used as a way to store favourite files and quickly navigate."/>
|
|
<TextBlock Text="The list of bookmarks is solution specific and are stored next to the .sln file with extension .unrealvs"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
<Border Name="RefreshingDialog" Focusable="False" Width="300" Height="100" BorderThickness="4" Visibility="Collapsed" Background="{DynamicResource {x:Static vsshell:VsBrushes.EditorExpansionFillKey}}" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock Name="RefreshingText" Focusable="False" Text="" Width="auto" Height="auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|