mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
6.6 KiB
188 lines
6.6 KiB
<?xml version="1.0" encoding="utf-8"?> |
|
<Window |
|
x:Class="ICSharpCode.ILSpy.MainWindow" |
|
x:ClassModifier="public" |
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tv="clr-namespace:ICSharpCode.TreeView;assembly=ICSharpCode.TreeView" |
|
xmlns:local="clr-namespace:ICSharpCode.ILSpy" xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView" |
|
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
|
Title="ILSpy" |
|
MinWidth="250" |
|
MinHeight="200" |
|
UseLayoutRounding="True" |
|
TextOptions.TextFormattingMode="Display" |
|
FocusManager.FocusedElement="{Binding ElementName=treeView}" |
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="500" d:DesignWidth="500" |
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" |
|
> |
|
<Window.Resources> |
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
|
</Window.Resources> |
|
<Window.CommandBindings> |
|
<CommandBinding |
|
Command="Open" |
|
Executed="OpenCommandExecuted" /> |
|
<CommandBinding |
|
Command="Refresh" |
|
Executed="RefreshCommandExecuted" /> |
|
<CommandBinding |
|
Command="Save" |
|
Executed="SaveCommandExecuted" /> |
|
<CommandBinding |
|
Command="BrowseBack" |
|
CanExecute="BackCommandCanExecute" |
|
Executed="BackCommandExecuted" /> |
|
<CommandBinding |
|
Command="BrowseForward" |
|
CanExecute="ForwardCommandCanExecute" |
|
Executed="ForwardCommandExecuted" /> |
|
<CommandBinding |
|
Command="Search" |
|
Executed="SearchCommandExecuted" /> |
|
</Window.CommandBindings> |
|
<Window.TaskbarItemInfo> |
|
<TaskbarItemInfo /> |
|
</Window.TaskbarItemInfo> |
|
<DockPanel> |
|
<!-- Main menu --> |
|
<Menu DockPanel.Dock="Top" Name="mainMenu" Height="23"> |
|
<MenuItem Header="_File" /> <!-- contents of file menu are added using MEF --> |
|
<MenuItem Header="_View"> |
|
<MenuItem Header="Show _internal types and members" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowInternalApi}"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
</MenuItem> |
|
</Menu> |
|
<!-- ToolBar --> |
|
<ToolBar |
|
Name="toolBar" |
|
DockPanel.Dock="Top" ToolBarTray.IsLocked="True"> |
|
<ToolBar.Resources> |
|
<!-- Make images transparent if menu command is disabled --> |
|
<Style TargetType="{x:Type Image}"> |
|
<Style.Triggers> |
|
<DataTrigger |
|
Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" |
|
Value="False"> |
|
<Setter Property="Opacity" Value="0.30" /> |
|
</DataTrigger> |
|
</Style.Triggers> |
|
</Style> |
|
</ToolBar.Resources> |
|
<!-- 'Navigation' toolbar category is inserted here --> |
|
<Separator /> |
|
<!-- 'Open' toolbar category is inserted here --> |
|
<Separator /> |
|
<CheckBox IsChecked="{Binding FilterSettings.ShowInternalApi}" ToolTip="Show internal types and members"> |
|
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" /> |
|
</CheckBox> |
|
<Separator /> |
|
<ComboBox Name="languageComboBox" DisplayMemberPath="Name" Width="100" |
|
ItemsSource="{x:Static local:Languages.AllLanguages}" |
|
SelectedItem="{Binding FilterSettings.Language}"/> |
|
</ToolBar> |
|
<!-- Status bar --> |
|
<StatusBar x:Name="statusBar" DockPanel.Dock="Bottom" Height="26" Visibility="Collapsed"> |
|
<StatusBarItem DockPanel.Dock="Right"> |
|
<TextBlock VerticalAlignment="Center" |
|
HorizontalAlignment="Right" |
|
x:Name="StatusLabel" |
|
ToolTip="Status" |
|
Text="Stand by..."/> |
|
</StatusBarItem> |
|
</StatusBar> |
|
<!-- Main grid separating left pane (treeView) from main pane (textEditor) --> |
|
<Grid> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition |
|
Name="leftColumn" |
|
MinWidth="100" |
|
Width="0.4*" /> |
|
<ColumnDefinition |
|
Width="3" /> |
|
<ColumnDefinition |
|
Name="rightColumn" |
|
MinWidth="100" |
|
Width="0.6*" /> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition |
|
Height="*" /> |
|
</Grid.RowDefinitions> |
|
<!-- Left pane: Tree View of assemblies and classes --> |
|
<tv:SharpTreeView |
|
Name="treeView" |
|
SelectionChanged="TreeView_SelectionChanged" |
|
ShowRoot="False" |
|
AllowDropOrder="True" |
|
AllowDrop="True" |
|
BorderThickness="0,1,1,1" Visibility="Visible" /> |
|
<GridSplitter |
|
Grid.ZIndex="1" |
|
Grid.Column="1" |
|
Margin="-5,0" |
|
BorderThickness="5,0" |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Stretch" |
|
Focusable="False" |
|
BorderBrush="Transparent" /> |
|
<!-- Right pane: Text Editor --> |
|
<Grid Grid.Column="2"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition |
|
Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="Auto" /> |
|
<RowDefinition Height="0" Name="topPaneRow" /> |
|
<RowDefinition Height="0" /> |
|
<RowDefinition Height="0.7*" MinHeight="100" Name="textViewRow" /> |
|
<RowDefinition Height="0" /> |
|
<RowDefinition Height="0" Name="bottomPaneRow" /> |
|
</Grid.RowDefinitions> |
|
<Border BorderBrush="Black" BorderThickness="1" Name="updatePanel" Visibility="Collapsed"> |
|
<DockPanel> |
|
<Button DockPanel.Dock="Right" Click="updatePanelCloseButtonClick" MinWidth="0">X</Button> |
|
<StackPanel Orientation="Horizontal"> |
|
<TextBlock Name="updatePanelMessage" Margin="4,0" VerticalAlignment="Center">A new ILSpy version is available.</TextBlock> |
|
<Button Name="downloadOrCheckUpdateButton" Click="downloadOrCheckUpdateButtonClick">Download</Button> |
|
</StackPanel> |
|
</DockPanel> |
|
</Border> |
|
|
|
<controls:DockedPane x:Name="topPane" Grid.Row="1" Title="Top" Visibility="Collapsed" |
|
CloseButtonClicked="TopPane_CloseButtonClicked" Margin="0,0,0,3" |
|
BorderThickness="1,1,0,1" /> |
|
|
|
<GridSplitter |
|
Grid.ZIndex="1" |
|
Grid.Row="2" |
|
Margin="0,-2,0,-5" |
|
BorderThickness="0,2,0,5" |
|
BorderBrush="Transparent" |
|
HorizontalAlignment="Stretch" |
|
VerticalAlignment="Center" |
|
Focusable="False" |
|
Visibility="{Binding Visibility, ElementName=topPane}" /> |
|
|
|
<!-- decompilerTextView is into the mainPane by code --> |
|
<ContentPresenter Name="mainPane" Grid.Row="3"/> |
|
|
|
<GridSplitter |
|
Grid.ZIndex="1" |
|
Grid.Row="4" |
|
Margin="0,-2,0,-5" |
|
BorderThickness="0,2,0,5" |
|
BorderBrush="Transparent" |
|
HorizontalAlignment="Stretch" |
|
VerticalAlignment="Center" |
|
Focusable="False" |
|
Visibility="{Binding Visibility, ElementName=bottomPane}" /> |
|
|
|
<controls:DockedPane x:Name="bottomPane" Grid.Row="5" Title="Bottom" Visibility="Collapsed" |
|
CloseButtonClicked="BottomPane_CloseButtonClicked" Margin="0,3,0,0" BorderThickness="1,1,0,1"/> |
|
</Grid> |
|
</Grid> |
|
</DockPanel> |
|
</Window> |