321 lines
25 KiB
Plaintext
321 lines
25 KiB
Plaintext
<base:BaseView x:Class="DTS.Viewer.MainView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
|
xmlns:prism="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism"
|
|
xmlns:interactionRequest="clr-namespace:Microsoft.Practices.Prism.Interactivity.InteractionRequest;assembly=Microsoft.Practices.Prism.Interactivity"
|
|
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
|
|
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
|
xmlns:dialogs="clr-namespace:DTS.Common.Dialogs;assembly=DTS.Common"
|
|
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
|
xmlns:dock="http://schemas.xceed.com/wpf/xaml/avalondock"
|
|
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="Auto" Height="Auto" >
|
|
|
|
<base:BaseView.Resources>
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
<ResourceDictionary x:Key="ResourceDictionary">
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../../../Themes/Default.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</base:BaseView.Resources>
|
|
|
|
<i:Interaction.Triggers>
|
|
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
|
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
|
</interactionRequest:InteractionRequestTrigger>
|
|
</i:Interaction.Triggers>
|
|
<toolkit:BusyIndicator IsBusy="{Binding IsBusy}" BusyContent="{Binding IsBusyMessage}" >
|
|
<Grid x:Name="MainShell" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<dock:DockingManager Grid.Row="0" BorderBrush="Black" BorderThickness="1" AllowMixedOrientation="True"
|
|
Style="{DynamicResource {x:Type dock:DockingManager}}"
|
|
ShowSystemMenu="False" UseLayoutRounding="False" IsManipulationEnabled="True"
|
|
VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" >
|
|
<dock:DockingManager.Resources>
|
|
<Style TargetType="{x:Type dock:LayoutDocumentTabItem}">
|
|
<Setter Property="Width" Value="80" />
|
|
</Style>
|
|
</dock:DockingManager.Resources>
|
|
<dock:DockingManager.Theme>
|
|
<dock:AeroTheme/>
|
|
</dock:DockingManager.Theme>
|
|
|
|
<dock:DockingManager.AnchorablePaneControlStyle>
|
|
<Style TargetType="{x:Type dock:LayoutAnchorablePaneControl}" >
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="TabStripPlacement" Value="Top"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Foreground" Value="{Binding Model.Root.Manager.Foreground, RelativeSource={RelativeSource Self}}"/>
|
|
<Setter Property="Background" Value="{Binding Model.Root.Manager.Background, RelativeSource={RelativeSource Self}}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dock:LayoutAnchorablePaneControl}">
|
|
<Grid x:Name="grid" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Background="Transparent" Grid.RowSpan="2"/>
|
|
<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Cycle"/>
|
|
<dock:AnchorablePaneTabPanel Grid.Row="0" x:Name="HeaderPanel" Margin="0,0,2,2" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
|
|
<Grid Grid.Row="1">
|
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
</Trigger>
|
|
<DataTrigger Binding="{Binding Items.Count, RelativeSource={RelativeSource Self}}" Value="1">
|
|
<Setter Property="Margin" Value="0" TargetName="HeaderPanel"/>
|
|
</DataTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemContainerStyle">
|
|
<Setter.Value>
|
|
<Style TargetType="{x:Type TabItem}" >
|
|
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor4, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor5, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor12, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
|
<Setter Property="ToolTip" Value="{Binding ToolTip}"/>
|
|
<Setter Property="Margin" Value="0,0,0,0"/>
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabItem}">
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"
|
|
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
|
|
ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor2, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor3, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Panel.ZIndex" Value="1"/>
|
|
<Setter Property="Margin" Value="0,0,0,0"/>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
<Condition Property="IsSelected" Value="False"/>
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor32, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor27, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Panel.ZIndex" Value="0"/>
|
|
</MultiTrigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor13, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=BaseColor9, TypeInTargetAssembly={x:Type dock:AeroColors}}}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Items.Count, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type TabControl}}}" Value="1">
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<dock:LayoutAnchorableTabItem Model="{Binding}"/>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<dock:LayoutAnchorableControl Model="{Binding}"/>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</dock:DockingManager.AnchorablePaneControlStyle>
|
|
<dock:DockingManager.DocumentHeaderTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="{Binding IconSource}" Margin="0,0,4,0"/>
|
|
<TextBlock Text="{Binding Title}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</dock:DockingManager.DocumentHeaderTemplate>
|
|
<dock:LayoutRoot x:Name="_layoutRoot">
|
|
<dock:LayoutPanel Orientation="Horizontal" IsMaximized="True" DockHeight="Auto" >
|
|
<dock:LayoutAnchorablePane DockWidth="250" DockHeight="*">
|
|
<dock:LayoutAnchorable CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True">
|
|
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
|
<ContentControl.Template >
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<Label Content="Let"/>
|
|
<ContentPresenter Content="{TemplateBinding Content}" MinWidth="200" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
</dock:LayoutAnchorablePane>
|
|
<dock:LayoutPanel Orientation="Vertical" IsMaximized="True" DockHeight="*">
|
|
<dock:LayoutAnchorablePane>
|
|
<dock:LayoutAnchorable IsActive="True" CanAutoHide="False" CanClose="False" CanHide="False">
|
|
<ContentControl x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphRegion}"
|
|
MinHeight="500" MinWidth="500"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<Label Content="Graph"/>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
</dock:LayoutAnchorablePane>
|
|
<dock:LayoutAnchorablePane DockHeight="250" IsMaximized="True" >
|
|
<dock:LayoutAnchorable Title="Tests" CanHide="False" CanClose="False" IsMaximized="True">
|
|
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestsRegion}"
|
|
Height="200" MinHeight="200"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Graphs" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True">
|
|
<ContentControl x:Name="GraphsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}"
|
|
Height="200" MinHeight="200"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Legend" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True">
|
|
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}"
|
|
Height="200" MinHeight="200"
|
|
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
</dock:LayoutAnchorablePane>
|
|
</dock:LayoutPanel>
|
|
<dock:LayoutPanel Orientation="Vertical" DockWidth="250" DockHeight="*" IsMaximized="True">
|
|
<dock:LayoutAnchorablePane >
|
|
<dock:LayoutAnchorable Title="Diag" CanHide="False" CanClose="False" AutoHideWidth="250" >
|
|
<ContentControl x:Name="DiagRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerDiagRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Stats" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True">
|
|
<ContentControl x:Name="StatsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerStatsRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Cursor" CanHide="False" CanClose="False" IsMaximized="True" >
|
|
<ContentControl x:Name="CursorRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerCursorRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
</dock:LayoutAnchorablePane>
|
|
<dock:LayoutAnchorablePane DockWidth="250" DockHeight="*" >
|
|
<dock:LayoutAnchorable Title="Display" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True" >
|
|
<ContentControl x:Name="PropertyRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyDisplayRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Modify" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True">
|
|
<ContentControl x:Name="ModifyRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyModifyRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
<dock:LayoutAnchorable Title="Add" CanHide="False" CanClose="False" AutoHideWidth="250" IsMaximized="True" >
|
|
<ContentControl x:Name="AddRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyAddRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Grid>
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
</dock:LayoutAnchorable>
|
|
</dock:LayoutAnchorablePane>
|
|
</dock:LayoutPanel>
|
|
</dock:LayoutPanel>
|
|
|
|
</dock:LayoutRoot>
|
|
</dock:DockingManager>
|
|
</Grid>
|
|
</toolkit:BusyIndicator>
|
|
|
|
</base:BaseView>
|
|
|
|
|
|
|