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.

113 lines
5.4 KiB

15 years ago
15 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Window x:Class="ICSharpCode.ILSpy.MainWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="clr-namespace:ICSharpCode.ILSpy"
  6. xmlns:avalondock="https://github.com/Dirkster99/AvalonDock"
  7. xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
  8. xmlns:docking="clr-namespace:ICSharpCode.ILSpy.Docking"
  9. xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
  10. Title="ILSpy"
  11. MinWidth="250"
  12. MinHeight="200"
  13. UseLayoutRounding="True"
  14. TextOptions.TextFormattingMode="Display"
  15. xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="500" d:DesignWidth="500"
  16. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
  17. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  18. xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes"
  19. xmlns:toms="urn:TomsToolbox"
  20. xmlns:viewModels="clr-namespace:ICSharpCode.ILSpy.ViewModels"
  21. xmlns:composition="urn:TomsToolbox.Composition"
  22. xmlns:commands="clr-namespace:ICSharpCode.ILSpy.Commands"
  23. xmlns:analyzers="clr-namespace:ICSharpCode.ILSpy.Analyzers"
  24. d:DataContext="{d:DesignInstance local:MainWindowViewModel}">
  25. <Window.Resources>
  26. <DataTemplate DataType="{x:Type viewModels:TabPageModel}">
  27. <ContentPresenter Content="{Binding Content}" />
  28. </DataTemplate>
  29. <DataTemplate DataType="{x:Type viewModels:LegacyToolPaneModel}">
  30. <ContentPresenter Content="{Binding Content}" />
  31. </DataTemplate>
  32. </Window.Resources>
  33. <b:Interaction.Behaviors>
  34. <themes:WindowStyleManagerBehavior />
  35. </b:Interaction.Behaviors>
  36. <Window.InputBindings>
  37. <KeyBinding Key="R" Modifiers="Control" Command="{composition:Import analyzers:AnalyzeCommand}" />
  38. <KeyBinding Key="Z" Modifiers="Control" Command="{x:Static NavigationCommands.BrowseBack}" />
  39. </Window.InputBindings>
  40. <Window.TaskbarItemInfo>
  41. <TaskbarItemInfo />
  42. </Window.TaskbarItemInfo>
  43. <DockPanel>
  44. <!-- Main menu -->
  45. <ContentControl DockPanel.Dock="Top" Content="{composition:Import controls:MainMenu}"/>
  46. <!-- ToolBar -->
  47. <ContentControl DockPanel.Dock="Top" Content="{composition:Import controls:MainToolBar}" />
  48. <!-- Update panel -->
  49. <ContentControl DockPanel.Dock="Top" Content="{composition:Import viewModels:UpdatePanelViewModel}" />
  50. <!-- Status bar -->
  51. <StatusBar x:Name="statusBar" DockPanel.Dock="Bottom" Height="26" Visibility="Collapsed">
  52. <StatusBarItem DockPanel.Dock="Right">
  53. <TextBlock VerticalAlignment="Center"
  54. HorizontalAlignment="Right"
  55. x:Name="statusLabel"
  56. ToolTip="{x:Static properties:Resources.Status}"
  57. Text="{x:Static properties:Resources.StandBy}" />
  58. </StatusBarItem>
  59. </StatusBar>
  60. <avalondock:DockingManager x:Name="DockManager"
  61. DataContext="{Binding Workspace}"
  62. ActiveContent="{Binding ActiveTabPage, Mode=TwoWay, Converter={docking:TabPageGuardConverter}}"
  63. AllowMixedOrientation="True">
  64. <avalondock:DockingManager.DocumentHeaderTemplate>
  65. <DataTemplate DataType="{x:Type viewModels:PaneModel}">
  66. <TextBlock x:Name="headerText" Text="{Binding Title}" />
  67. <DataTemplate.Triggers>
  68. <DataTrigger Binding="{Binding IsActive}" Value="True">
  69. <Setter TargetName="headerText" Property="FontWeight" Value="Bold" />
  70. </DataTrigger>
  71. </DataTemplate.Triggers>
  72. </DataTemplate>
  73. </avalondock:DockingManager.DocumentHeaderTemplate>
  74. <avalondock:DockingManager.LayoutItemContainerStyleSelector>
  75. <docking:PaneStyleSelector>
  76. <docking:PaneStyleSelector.ToolPaneStyle>
  77. <Style TargetType="{x:Type avalondock:LayoutAnchorableItem}">
  78. <Setter Property="Title" Value="{Binding Model.Title}" />
  79. <Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={toms:BooleanToVisibilityConverter VisibilityWhenBooleanIsFalse=Hidden}}" />
  80. <Setter Property="ContentId" Value="{Binding Model.ContentId}" />
  81. <Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}" />
  82. <Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}" />
  83. <Setter Property="CanHide" Value="{Binding Model.IsCloseable}" />
  84. <Setter Property="HideCommand" Value="{Binding Model.CloseCommand}" />
  85. <Setter Property="CanClose" Value="{Binding Model.IsCloseable}" />
  86. <Setter Property="CloseCommand" Value="{Binding Model.CloseCommand}" />
  87. </Style>
  88. </docking:PaneStyleSelector.ToolPaneStyle>
  89. <docking:PaneStyleSelector.TabPageStyle>
  90. <Style TargetType="{x:Type avalondock:LayoutItem}">
  91. <Setter Property="Title" Value="{Binding Model.Title}" />
  92. <Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={toms:BooleanToVisibilityConverter VisibilityWhenBooleanIsFalse=Hidden}}" />
  93. <Setter Property="ContentId" Value="{Binding Model.ContentId}" />
  94. <Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}" />
  95. <Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}" />
  96. <Setter Property="CloseCommand" Value="{Binding Model.CloseCommand}" />
  97. <Setter Property="CanClose" Value="{Binding Model.IsCloseable, Mode=TwoWay}" />
  98. </Style>
  99. </docking:PaneStyleSelector.TabPageStyle>
  100. </docking:PaneStyleSelector>
  101. </avalondock:DockingManager.LayoutItemContainerStyleSelector>
  102. </avalondock:DockingManager>
  103. </DockPanel>
  104. </Window>