init
This commit is contained in:
332
DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainView.xaml
Normal file
332
DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainView.xaml
Normal file
@@ -0,0 +1,332 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.ExportMainView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
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" xmlns:interactivity="clr-namespace:DTS.Common.Interactivity;assembly=DTS.Common"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
|
||||
<base:BaseView.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<converters:WidthConverter x:Key="WidthConverter" />
|
||||
</base:BaseView.Resources>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactivity:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactivity:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<toolkit:BusyIndicator IsBusy="{Binding IsBusy, UpdateSourceTrigger=PropertyChanged}" BusyContent="{Binding IsBusyMessage}" Visibility="Visible" >
|
||||
<DockPanel x:Name="MainShell" FlowDirection="LeftToRight" LastChildFill="True" SnapsToDevicePixels="True" WindowChrome.ResizeGripDirection="TopLeft" >
|
||||
<dock:DockingManager Name="DockManager" 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="100" />
|
||||
</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 Grid.Row="0" 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:LayoutRoot x:Name="_layoutRoot" >
|
||||
<dock:LayoutPanel Orientation="Horizontal" IsMaximized="True" DockHeight="*" >
|
||||
<dock:LayoutAnchorablePane Name="NavigationPane" DockWidth="250" DockHeight="*">
|
||||
<dock:LayoutAnchorable ContentId="NavigationRegionPanel" IsMaximized="True" AutoHideWidth="100" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}"
|
||||
Width="250" VerticalAlignment="Stretch" HorizontalAlignment="Left">
|
||||
<ContentControl.Template >
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="Left"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" MinWidth="240" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutPanel Orientation="Vertical" IsMaximized="True" DockHeight="*" DockWidth="Auto">
|
||||
<dock:LayoutAnchorablePane Name="GraphPane" DockWidth="*" DockHeight="*">
|
||||
<dock:LayoutAnchorable CanAutoHide="False" CanClose="False" CanHide="False">
|
||||
<ContentControl x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
Height="Auto" Width="Auto" MinHeight="500" MinWidth="500">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutAnchorablePane Name="TestPane" DockMinHeight="100" DockWidth="*" DockHeight="*" >
|
||||
<dock:LayoutAnchorable ContentId="TestRegionPanel" x:Name="TestRegionPanel" Title="Tests" CanClose="False" CanHide="False" IsVisible="False" CanAutoHide="True" CanFloat="True" >
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestsRegion}"
|
||||
Width="{Binding Path=ActualWidth, ElementName=TestPane, Converter={StaticResource WidthConverter}, ConverterParameter='1'}"
|
||||
Height="{Binding Path=ActualHeight, ElementName=TestPane, Converter={StaticResource WidthConverter}, ConverterParameter='1'}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="GraphRegionPanel" x:Name="GraphListPanel" Title="Graphs" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="GraphListRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphListRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<!--<dock:LayoutAnchorable ContentId="SettingsRegionPanel" x:Name="SettingsPanel" Title="Settings" CanClose="False" CanHide="True" IsVisible="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="SettingsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerSettingsRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="LegendRegionPanel" Title="Legend" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>-->
|
||||
</dock:LayoutAnchorablePane>
|
||||
</dock:LayoutPanel>
|
||||
<dock:LayoutPanel Orientation="Vertical" DockWidth="320" DockMinWidth="300" DockHeight="Auto" >
|
||||
<dock:LayoutAnchorablePane Name="DiagnosticPane" DockWidth="300" DockMinWidth="300" DockHeight="*" IsMaximized="True" >
|
||||
<dock:LayoutAnchorable ContentId="DiagRegionPanel" Title="Diag" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="DiagRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerDiagRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="StatsRegionPanel" Title="Stats" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="StatsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerStatsRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="CursorRegionPanel" Title="Cursor" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="CursorRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerCursorRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutAnchorablePane Name="ModificationPane" DockWidth="300" DockMinWidth="300" DockHeight="*" IsMaximized="True" >
|
||||
<dock:LayoutAnchorable ContentId="ChartOptionsPanel" Title="Display" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="ChartOptionsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerChartOptionsRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="ModifyRegionPanel" Title="Modify" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="TestModificationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestModificationRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="AddRegionPanel" Title="Add" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="AddRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyAddRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<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>-->
|
||||
</DockPanel>
|
||||
</toolkit:BusyIndicator>
|
||||
</base:BaseView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable ArrangeTypeMemberModifiers
|
||||
// ReSharper disable UnusedMember.Local
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
// ReSharper disable RedundantDefaultMemberInitializer
|
||||
// ReSharper disable ConvertClosureToMethodGroup
|
||||
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ExportMainView.xaml
|
||||
/// </summary>
|
||||
public partial class ExportMainView : IExportMainView
|
||||
{
|
||||
|
||||
public ExportMainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
140
DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainViewGrid.xaml
Normal file
140
DTS Viewer/DTS.Viewer/Modules/Main/View/ExportMainViewGrid.xaml
Normal file
@@ -0,0 +1,140 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.ExportMainViewGrid"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:dialogs="clr-namespace:DTS.Common.Dialogs;assembly=DTS.Common"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:DTS.Viewer"
|
||||
xmlns:interactionRequest="clr-namespace:DTS.Common.Interactivity;assembly=DTS.Common"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<Grid x:Name="MainShell" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" UseLayoutRounding="True" SnapsToDevicePixels="True" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="testsColumn" Width="310" />
|
||||
<ColumnDefinition x:Name="separatorColumn" Width="5" />
|
||||
<ColumnDefinition x:Name="graphsColumn" Width="*" />
|
||||
<ColumnDefinition x:Name="optionsColumn" Width="310" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Nav-->
|
||||
<Grid Grid.Column="0" Grid.Row="0" Visibility="Collapsed" >
|
||||
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Left" Visibility="Collapsed">
|
||||
<ContentControl.Template >
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="Left"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" MinWidth="240" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
<!-- FB12164, a repurposed FB11709 -->
|
||||
<ToggleButton Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Panel.ZIndex="140" FontSize="8" AutomationProperties.AutomationId="btnCollapseNavPanel"
|
||||
Height="15" Width="15" Background="{StaticResource Brush_ApplicationContentBackground}" Content="<<">
|
||||
<ToggleButton.Triggers>
|
||||
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
||||
<BeginStoryboard>
|
||||
<Storyboard x:Name="ShowTabPanel">
|
||||
<controls:GridLengthAnimation Storyboard.TargetName="testsColumn" Storyboard.TargetProperty="Width" From="15" Duration="0:0:0.1" FillBehavior="Stop" />
|
||||
<DoubleAnimation Storyboard.TargetName="graphSelectionTabPane" Storyboard.TargetProperty="Opacity" From="0.0" To="1.0" Duration="0:0:0.1" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="<<" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="ToggleButton.Checked">
|
||||
<BeginStoryboard>
|
||||
<Storyboard x:Name="HideTabPanel">
|
||||
<controls:GridLengthAnimation Storyboard.TargetName="testsColumn" Storyboard.TargetProperty="Width" To="15" Duration="0:0:0.1" />
|
||||
<DoubleAnimation Storyboard.TargetName="graphSelectionTabPane" Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:0.1" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value=">>" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</ToggleButton.Triggers>
|
||||
</ToggleButton>
|
||||
<TabControl x:Name="graphSelectionTabPane" Grid.Column="0" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutomationProperties.AutomationId="GraphSelectionTabPane">
|
||||
<TabItem x:Name="testsTab" Visibility ="Hidden" Header="{Binding Path=TitleTests}" AutomationProperties.AutomationId="TestsTab">
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestsRegion}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
<TabItem x:Name="graphsTab" Header="{Binding Path=TitleGraphs}" AutomationProperties.AutomationId="GraphsTab">
|
||||
<ContentControl x:Name="GraphListRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphListRegion}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
<TabItem Header="Legend" Visibility="Collapsed" AutomationProperties.AutomationId="LegendTab">
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<GridSplitter Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" Width="5" ResizeBehavior="PreviousAndNext" ResizeDirection="Columns"/>
|
||||
<!-- Graph -->
|
||||
<ContentControl Grid.Column="2" Grid.Row="0" x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using C1.WPF.Pdf;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
// ReSharper disable CheckNamespace
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ViewerMainViewGrid.xaml
|
||||
/// </summary>
|
||||
public partial class ExportMainViewGrid : IExportMainViewGrid
|
||||
{
|
||||
|
||||
public ExportMainViewGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += ExportMainViewGrid_Loaded;
|
||||
}
|
||||
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private void SetFocus()
|
||||
{
|
||||
}
|
||||
//FB 14797 Subscribe to event after the page loaded to make sure eventAggregator is available
|
||||
private void ExportMainViewGrid_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
_eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
_eventAggregator?.GetEvent<GraphLoadedCountNotification>().Subscribe(OnGraphLoadedCountNotification);
|
||||
}
|
||||
|
||||
//FB 14797 Set the focus to first tab (chartOptTab) after the graph is fully loaded (3 sec)
|
||||
private void OnGraphLoadedCountNotification(GraphLoadedCountNotificationArg arg)
|
||||
{
|
||||
if (null != DataContext && (IBaseViewModel)DataContext != arg.ParentVM) return;
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(TimeSpan.FromSeconds(3));
|
||||
Dispatcher.BeginInvoke((System.Action)SetFocus);
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns > 0 if successful, < 0 if failure, or 0 if the MainChart is not ready yet
|
||||
/// </summary>
|
||||
/// <param name="directory"></param>
|
||||
/// <param name="pdfFileName"></param>
|
||||
/// <returns></returns>
|
||||
public int SaveToPDF(string directory, string pdfFileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
//FB 29493 Error message in log before success message
|
||||
if (MainShell.DesiredSize.Height == 0 || MainShell.DesiredSize.Width == 0) return 0;
|
||||
if (string.IsNullOrEmpty(directory) || string.IsNullOrEmpty(pdfFileName) || !pdfFileName.EndsWith(".pdf")) return -1;
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(MainShell);
|
||||
// desired resolution:
|
||||
double dpiX = 300, dpiY = 300;
|
||||
var bmp = new RenderTargetBitmap((int)(bounds.Width * dpiX / 96.0), (int)(bounds.Height * dpiY / 96.0), dpiX, dpiY, PixelFormats.Pbgra32);
|
||||
bmp.Render(MainShell);
|
||||
var wBmp = new WriteableBitmap(bmp);
|
||||
|
||||
var pdf = new C1PdfDocument
|
||||
{
|
||||
Landscape = true,
|
||||
PageSize = new Size(MainShell.ActualWidth, MainShell.ActualHeight)
|
||||
};
|
||||
pdf.DrawImage(wBmp, new Rect(0, 0, MainShell.ActualWidth, MainShell.ActualHeight));
|
||||
pdf.Save(Path.Combine(directory, pdfFileName));
|
||||
|
||||
DTS.Common.Utils.PNGImageUtil.SaveImage(MainShell, System.IO.Path.Combine(directory, pdfFileName.Replace(".pdf", ".png")));
|
||||
return 1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.LogException(ex);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
407
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView - Copy 1.xaml
Normal file
407
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView - Copy 1.xaml
Normal file
@@ -0,0 +1,407 @@
|
||||
<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"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="Auto" Width="Auto">
|
||||
|
||||
<base:BaseView.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<ResourceDictionary x:Key="ResourceDictionary">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Themes/Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
<!--<Style x:Key="{x:Type dock:DockingManager}" x:Name="DockingManagerStyle" TargetType="{x:Type dock:DockingManager}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static dock:AeroColors.BaseColor1Key}}"/>
|
||||
<Setter Property="DocumentPaneControlStyle" Value="{StaticResource AvalonDock_ThemeAero_DocumentPaneControlStyle}"/>
|
||||
<Setter Property="AnchorablePaneControlStyle" Value="{StaticResource AvalonDock_ThemeAero_AnchorablePaneControlStyle}"/>
|
||||
<Setter Property="AnchorSideTemplate" Value="{StaticResource AvalonDock_ThemeAero_AnchorSideTemplate}"/>
|
||||
<Setter Property="AnchorGroupTemplate" Value="{StaticResource AvalonDock_ThemeAero_AnchorGroupTemplate}"/>
|
||||
<Setter Property="AnchorTemplate" Value="{StaticResource AvalonDock_ThemeAero_AnchorTemplate}"/>
|
||||
<Setter Property="DocumentHeaderTemplate" Value="{StaticResource AvalonDock_ThemeAero_DocumentHeaderTemplate}"/>
|
||||
<Setter Property="AnchorableHeaderTemplate" Value="{StaticResource AvalonDock_ThemeAero_AnchorableHeaderTemplate}"/>
|
||||
<Setter Property="DocumentTitleTemplate" Value="{StaticResource AvalonDock_ThemeAero_DocumentTitleTemplate}"/>
|
||||
<Setter Property="AnchorableTitleTemplate" Value="{StaticResource AvalonDock_ThemeAero_AnchorableTitleTemplate}"/>
|
||||
<Setter Property="AnchorableContextMenu" Value="{StaticResource AvalonDock_ThemeAero_AnchorableContextMenu}"/>
|
||||
<Setter Property="DocumentContextMenu" Value="{StaticResource AvalonDock_ThemeAero_DocumentContextMenu}"/>
|
||||
<Setter Property="DocumentPaneMenuItemHeaderTemplate" Value="{StaticResource AvalonDock_ThemeAero_DocumentHeaderTemplate}"/>
|
||||
<Setter Property="IconContentTemplate" Value="{StaticResource AvalonDock_ThemeAero_IconContentTemplate}"/>
|
||||
<Setter Property="GridSplitterWidth" Value="4"/>
|
||||
<Setter Property="GridSplitterHeight" Value="4"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type dock:DockingManager}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Grid Grid.IsSharedSizeScope="True">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter Content="{TemplateBinding LayoutRootPanel}" Grid.Column="1" Grid.Row="1"/>
|
||||
<ContentPresenter Content="{TemplateBinding RightSidePanel}" Grid.Column="2" Grid.Row="1"/>
|
||||
<ContentPresenter Content="{TemplateBinding LeftSidePanel}" Grid.Column="0" Grid.Row="1"/>
|
||||
<ContentPresenter Content="{TemplateBinding TopSidePanel}" Grid.Column="1" Grid.Row="0"/>
|
||||
<ContentPresenter Content="{TemplateBinding BottomSidePanel}" Grid.Column="1" Grid.Row="2"/>
|
||||
<ContentPresenter x:Name="PART_AutoHideArea" Content="{TemplateBinding AutoHideWindow}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="1"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
</base:BaseView.Resources>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<StackPanel x:Name="MainShell" Orientation="Vertical" VerticalAlignment="Stretch" >
|
||||
<dock:DockingManager BorderBrush="Black" BorderThickness="1" AllowMixedOrientation="True" Style="{DynamicResource {x:Type dock:DockingManager}}"
|
||||
ShowSystemMenu="False" UseLayoutRounding="False" IsManipulationEnabled="True"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="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:LayoutRoot.LeftSide >
|
||||
<dock:LayoutAnchorSide>
|
||||
<dock:LayoutAnchorGroup>
|
||||
<dock:LayoutAnchorable CanHide="False" CanClose="False" AutoHideWidth="250" Title ="0987654321" 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}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable CanHide="False" CanClose="False" AutoHideWidth="250" Title ="1234567890">
|
||||
<ContentControl x:Name="NavigationRegion1" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="Let"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorGroup>
|
||||
</dock:LayoutAnchorSide>
|
||||
</dock:LayoutRoot.LeftSide>
|
||||
|
||||
<dock:LayoutPanel Orientation="Horizontal" >
|
||||
<dock:LayoutDocumentPaneGroup IsMaximized="True">
|
||||
|
||||
<dock:LayoutDocumentPane x:Name="ViewerPane" IsMaximized="True" >
|
||||
<dock:LayoutDocument ContentId="viewerEu" Title="EU " CanClose="False" >
|
||||
<ContentControl x:Name="EuRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEuRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="EU"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerMv" Title="mV " CanClose="False" >
|
||||
<ContentControl x:Name="MvRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerMvRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="mV"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerEdc" Title="EDC " CanClose="False" >
|
||||
<ContentControl x:Name="EdcRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEdcRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="EDC"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
|
||||
</dock:LayoutDocumentPane>
|
||||
</dock:LayoutDocumentPaneGroup>
|
||||
</dock:LayoutPanel>
|
||||
|
||||
<dock:LayoutRoot.RightSide>
|
||||
<dock:LayoutAnchorSide>
|
||||
<dock:LayoutAnchorGroup>
|
||||
<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" >
|
||||
<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" AutoHideWidth="250" >
|
||||
<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:LayoutAnchorGroup>
|
||||
|
||||
<dock:LayoutAnchorGroup>
|
||||
<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:LayoutAnchorGroup>
|
||||
</dock:LayoutAnchorSide>
|
||||
</dock:LayoutRoot.RightSide>
|
||||
|
||||
<dock:LayoutRoot.BottomSide>
|
||||
<dock:LayoutAnchorSide>
|
||||
<dock:LayoutAnchorGroup>
|
||||
<dock:LayoutAnchorable Title="Tests" CanHide="False" CanClose="False" >
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestsRegion}" 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" >
|
||||
<ContentControl x:Name="GraphsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}" 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" >
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}" MinHeight="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:LayoutAnchorGroup>
|
||||
</dock:LayoutAnchorSide>
|
||||
</dock:LayoutRoot.BottomSide>
|
||||
</dock:LayoutRoot>
|
||||
</dock:DockingManager>
|
||||
</StackPanel>
|
||||
|
||||
</base:BaseView>
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
<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"
|
||||
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>
|
||||
|
||||
<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" Title ="0987654321" 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}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable CanHide="False" CanClose="False" AutoHideWidth="250" Title ="1234567890">
|
||||
<ContentControl x:Name="NavigationRegion1" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="Let"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutPanel Orientation="Vertical" IsMaximized="True" DockHeight="*">
|
||||
<dock:LayoutDocumentPaneGroup Orientation="Horizontal">
|
||||
<dock:LayoutDocumentPane x:Name="ViewerPane" IsMaximized="True" DockMinHeight="500" DockMinWidth="500" DockHeight="500*">
|
||||
<dock:LayoutDocument ContentId="viewerEu" Title="EU" CanClose="False" IsMaximized="True">
|
||||
<ContentControl x:Name="EuRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEuRegion}"
|
||||
MinHeight="500" MinWidth="500"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="EU"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerMv" Title="mV" CanClose="False" IsMaximized="True" >
|
||||
<ContentControl x:Name="MvRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerMvRegion}"
|
||||
MinHeight="500" MinWidth="500"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="mV"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerEdc" Title="ADC" CanClose="False" IsMaximized="True" >
|
||||
<ContentControl x:Name="EdcRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEdcRegion}"
|
||||
MinHeight="500" MinWidth="500"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="EDC"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
</dock:LayoutDocumentPane>
|
||||
</dock:LayoutDocumentPaneGroup>
|
||||
<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>
|
||||
|
||||
</base:BaseView>
|
||||
|
||||
208
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView - Copy.xaml
Normal file
208
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView - Copy.xaml
Normal file
@@ -0,0 +1,208 @@
|
||||
<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" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<!--<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>-->
|
||||
|
||||
<StackPanel x:Name="MainShell" Orientation="Vertical" VerticalAlignment="Stretch" >
|
||||
<dock:DockingManager VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="Black" BorderThickness="1" ShowSystemMenu="False">
|
||||
<dock:DockingManager.Theme>
|
||||
<dock:VS2010Theme/>
|
||||
</dock:DockingManager.Theme>
|
||||
<dock:DockingManager.Resources>
|
||||
<Style TargetType="{x:Type dock:LayoutDocumentTabItem}">
|
||||
<Setter Property="Width" Value="80" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type dock:LayoutAnchorableTabItem}">
|
||||
<Setter Property="Width" Value="50" />
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Style>
|
||||
</dock:DockingManager.Resources>
|
||||
<!--<dock:DockingManager.Theme>
|
||||
<dock:AeroTheme/>
|
||||
</dock:DockingManager.Theme>-->
|
||||
<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">
|
||||
<!-- NavigationRegion -->
|
||||
<dock:LayoutAnchorablePane DockWidth="250" >
|
||||
<dock:LayoutAnchorable CanHide="False" CanClose="False" AutoHideWidth="250">
|
||||
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>Let</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutPanel Orientation="Vertical" IsMaximized="True">
|
||||
<dock:LayoutDocumentPaneGroup>
|
||||
<dock:LayoutDocumentPane x:Name="ViewerPane" >
|
||||
<dock:LayoutDocument ContentId="viewerEu" Title="EU " CanClose="False" >
|
||||
<ContentControl x:Name="EuRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEuRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>EU</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerMv" Title="mV " CanClose="False" >
|
||||
<ContentControl x:Name="MvRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerMvRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>mV</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
<dock:LayoutDocument ContentId="viewerEdc" Title="EDC " CanClose="False" >
|
||||
<ContentControl x:Name="EdcRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerEdcRegion}" MinWidth="500" MinHeight="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>EDC</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutDocument>
|
||||
</dock:LayoutDocumentPane>
|
||||
</dock:LayoutDocumentPaneGroup >
|
||||
<dock:LayoutAnchorablePaneGroup Orientation="Horizontal" DockHeight="270">
|
||||
<dock:LayoutAnchorablePane >
|
||||
<dock:LayoutAnchorable Title="Tests" CanHide="False" CanClose="False" AutoHideHeight="250">
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestsRegion}" MinHeight="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable Title="Graphs" CanHide="False" CanClose="False" AutoHideHeight="250">
|
||||
<ContentControl x:Name="GraphsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}" MinHeight="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable Title="Legend" CanHide="False" CanClose="False" AutoHideHeight="250">
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}" MinHeight="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
</dock:LayoutAnchorablePaneGroup>
|
||||
</dock:LayoutPanel>
|
||||
<dock:LayoutPanel Orientation="Vertical">
|
||||
<dock:LayoutAnchorablePaneGroup >
|
||||
<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="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable Title="Stats" CanHide="False" CanClose="False" AutoHideWidth="250">
|
||||
<ContentControl x:Name="StatsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerStatsRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable Title="Cursor" CanHide="False" CanClose="False" AutoHideWidth="250">
|
||||
<ContentControl x:Name="CursorRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerCursorRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
</dock:LayoutAnchorablePaneGroup>
|
||||
<dock:LayoutAnchorablePaneGroup >
|
||||
<dock:LayoutAnchorablePane>
|
||||
<dock:LayoutAnchorable Title="Properies" CanHide="False" CanClose="False" AutoHideWidth="250">
|
||||
<ContentControl x:Name="PropertyRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyRegion}" MinWidth="250" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
</dock:LayoutAnchorablePaneGroup>
|
||||
</dock:LayoutPanel>
|
||||
</dock:LayoutPanel>
|
||||
|
||||
</dock:LayoutRoot>
|
||||
</dock:DockingManager>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
|
||||
320
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView.xaml
Normal file
320
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView.xaml
Normal file
@@ -0,0 +1,320 @@
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
15
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView.xaml.cs
Normal file
15
DTS Viewer/DTS.Viewer/Modules/Main/View/MainView.xaml.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainView : IMainView
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
92
DTS Viewer/DTS.Viewer/Modules/Main/View/MainViewLite.xaml
Normal file
92
DTS Viewer/DTS.Viewer/Modules/Main/View/MainViewLite.xaml
Normal file
@@ -0,0 +1,92 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.MainViewLite"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
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">
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<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>
|
||||
<!--<ContentControl x:Name="MenuRegion" MinHeight="50" Visibility="{Binding IsMenuIncluded, Converter={StaticResource BooleanToVisibilityConverter}}" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>-->
|
||||
<StackPanel x:Name="MainShell" Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
|
||||
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinHeight="500" MinWidth="150"
|
||||
Visibility="{Binding IsNavigationIncluded, Converter={StaticResource BooleanToVisibilityConverter}}" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>Let</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
<ContentControl x:Name="MainRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.MainRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
MinHeight="500" MinWidth="1000">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>Center</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
<ContentControl x:Name="VerticalTabRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.VerticalTabRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinHeight="250" MinWidth="250"
|
||||
Visibility="{Binding IsNavigationIncluded, Converter={StaticResource BooleanToVisibilityConverter}}" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>Right</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</StackPanel>
|
||||
|
||||
<ContentControl x:Name="HorizontalTabRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.HorizontalTabRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MinHeight="250" MinWidth="250"
|
||||
Visibility="{Binding IsNavigationIncluded, Converter={StaticResource BooleanToVisibilityConverter}}" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Grid>
|
||||
<Label>Bottom</Label>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
16
DTS Viewer/DTS.Viewer/Modules/Main/View/MainViewLite.xaml.cs
Normal file
16
DTS Viewer/DTS.Viewer/Modules/Main/View/MainViewLite.xaml.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainViewLite.xaml
|
||||
/// </summary>
|
||||
public partial class MainViewLite : IMainViewerView
|
||||
{
|
||||
public MainViewLite()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
332
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainView.xaml
Normal file
332
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainView.xaml
Normal file
@@ -0,0 +1,332 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.ViewerMainView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
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" xmlns:interactivity="clr-namespace:DTS.Common.Interactivity;assembly=DTS.Common"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
|
||||
<base:BaseView.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<converters:WidthConverter x:Key="WidthConverter" />
|
||||
</base:BaseView.Resources>
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactivity:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactivity:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<toolkit:BusyIndicator IsBusy="{Binding IsBusy, UpdateSourceTrigger=PropertyChanged}" BusyContent="{Binding IsBusyMessage}" Visibility="Visible" >
|
||||
<DockPanel x:Name="MainShell" FlowDirection="LeftToRight" LastChildFill="True" SnapsToDevicePixels="True" WindowChrome.ResizeGripDirection="TopLeft" >
|
||||
<dock:DockingManager Name="DockManager" 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="100" />
|
||||
</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 Grid.Row="0" 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:LayoutRoot x:Name="_layoutRoot" >
|
||||
<dock:LayoutPanel Orientation="Horizontal" IsMaximized="True" DockHeight="*" >
|
||||
<dock:LayoutAnchorablePane Name="NavigationPane" DockWidth="250" DockHeight="*">
|
||||
<dock:LayoutAnchorable ContentId="NavigationRegionPanel" IsMaximized="True" AutoHideWidth="100" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="NavigationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.NavigationRegion}"
|
||||
Width="250" VerticalAlignment="Stretch" HorizontalAlignment="Left">
|
||||
<ContentControl.Template >
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<Label Content="Left"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" MinWidth="240" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutPanel Orientation="Vertical" IsMaximized="True" DockHeight="*" DockWidth="Auto">
|
||||
<dock:LayoutAnchorablePane Name="GraphPane" DockWidth="*" DockHeight="*">
|
||||
<dock:LayoutAnchorable CanAutoHide="False" CanClose="False" CanHide="False">
|
||||
<ContentControl x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
Height="Auto" Width="Auto" MinHeight="500" MinWidth="500">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutAnchorablePane Name="TestPane" DockMinHeight="100" DockWidth="*" DockHeight="*" >
|
||||
<dock:LayoutAnchorable ContentId="TestRegionPanel" x:Name="TestRegionPanel" Title="Tests" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True" >
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="ViewerTestsRegion2"
|
||||
Width="{Binding Path=ActualWidth, ElementName=TestPane, Converter={StaticResource WidthConverter}, ConverterParameter='1'}"
|
||||
Height="{Binding Path=ActualHeight, ElementName=TestPane, Converter={StaticResource WidthConverter}, ConverterParameter='1'}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="GraphRegionPanel" x:Name="GraphListPanel" Title="Graphs" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="GraphListRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphListRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="SettingsRegionPanel" x:Name="SettingsPanel" Title="Settings" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="SettingsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerSettingsRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="LegendRegionPanel" Title="Legend" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="True">
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
</dock:LayoutPanel>
|
||||
<dock:LayoutPanel Orientation="Vertical" DockWidth="320" DockMinWidth="300" DockHeight="Auto" >
|
||||
<dock:LayoutAnchorablePane Name="DiagnosticPane" DockWidth="300" DockMinWidth="300" DockHeight="*" IsMaximized="True" >
|
||||
<dock:LayoutAnchorable ContentId="DiagRegionPanel" Title="Diag" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="DiagRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerDiagRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="StatsRegionPanel" Title="Stats" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="StatsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerStatsRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="CursorRegionPanel" Title="Cursor" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="CursorRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerCursorRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
</dock:LayoutAnchorablePane>
|
||||
<dock:LayoutAnchorablePane Name="ModificationPane" DockWidth="300" DockMinWidth="300" DockHeight="*" IsMaximized="True" >
|
||||
<dock:LayoutAnchorable ContentId="ChartOptionsPanel" Title="Display" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="ChartOptionsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerChartOptionsRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="ModifyRegionPanel" Title="Modify" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="TestModificationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestModificationRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</dock:LayoutAnchorable>
|
||||
<dock:LayoutAnchorable ContentId="AddRegionPanel" Title="Add" CanClose="False" CanHide="False" CanAutoHide="True" CanFloat="False" >
|
||||
<ContentControl x:Name="AddRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyAddRegion}"
|
||||
Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<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>-->
|
||||
</DockPanel>
|
||||
</toolkit:BusyIndicator>
|
||||
</base:BaseView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable ArrangeTypeMemberModifiers
|
||||
// ReSharper disable UnusedMember.Local
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
// ReSharper disable RedundantDefaultMemberInitializer
|
||||
// ReSharper disable ConvertClosureToMethodGroup
|
||||
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ViewerMainView.xaml
|
||||
/// </summary>
|
||||
public partial class ViewerMainView : IViewerMainView
|
||||
{
|
||||
|
||||
public ViewerMainView()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
//this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
|
||||
//this.Unloaded += new RoutedEventHandler(MainWindow_Unloaded);
|
||||
}
|
||||
|
||||
//void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var serializer = new XmlLayoutSerializer(DockManager);
|
||||
// serializer.LayoutSerializationCallback += (s, args) =>
|
||||
// {
|
||||
// args.Content = args.Content;
|
||||
// };
|
||||
|
||||
// if (File.Exists(@".\DataProViewerAvalonDock.config"))
|
||||
// serializer.Deserialize(@".\DataProViewerAvalonDock.config");
|
||||
//}
|
||||
|
||||
//void MainWindow_Unloaded(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var serializer = new XmlLayoutSerializer(DockManager);
|
||||
// serializer.Serialize(@".\DataProViewerAvalonDock.config");
|
||||
//}
|
||||
}
|
||||
}
|
||||
211
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainViewGrid.xaml
Normal file
211
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerMainViewGrid.xaml
Normal file
@@ -0,0 +1,211 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.ViewerMainViewGrid"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:dialogs="clr-namespace:DTS.Common.Dialogs;assembly=DTS.Common"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:DTS.Viewer"
|
||||
xmlns:interactionRequest="clr-namespace:DTS.Common.Interactivity;assembly=DTS.Common"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<Grid x:Name="MainShell" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" UseLayoutRounding="True" SnapsToDevicePixels="True" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="testsColumn" Width="310" />
|
||||
<ColumnDefinition x:Name="separatorColumn" Width="5" />
|
||||
<ColumnDefinition x:Name="graphsColumn" Width="*" />
|
||||
<ColumnDefinition x:Name="optionsColumn" Width="310" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- FB12164, a repurposed FB11709 -->
|
||||
<ToggleButton Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Panel.ZIndex="140" FontSize="8" AutomationProperties.AutomationId="btnCollapseNavPanel"
|
||||
Height="15" Width="15" Background="{StaticResource Brush_ApplicationContentBackground}" Content="<<">
|
||||
<ToggleButton.Triggers>
|
||||
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
||||
<BeginStoryboard>
|
||||
<Storyboard x:Name="ShowTabPanel">
|
||||
<controls:GridLengthAnimation Storyboard.TargetName="testsColumn" Storyboard.TargetProperty="Width" From="15" Duration="0:0:0.1" FillBehavior="Stop" />
|
||||
<DoubleAnimation Storyboard.TargetName="graphSelectionTabPane" Storyboard.TargetProperty="Opacity" From="0.0" To="1.0" Duration="0:0:0.1" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="<<" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="ToggleButton.Checked">
|
||||
<BeginStoryboard>
|
||||
<Storyboard x:Name="HideTabPanel">
|
||||
<controls:GridLengthAnimation Storyboard.TargetName="testsColumn" Storyboard.TargetProperty="Width" To="15" Duration="0:0:0.1" />
|
||||
<DoubleAnimation Storyboard.TargetName="graphSelectionTabPane" Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:0.1" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value=">>" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</ToggleButton.Triggers>
|
||||
</ToggleButton>
|
||||
<TabControl x:Name="graphSelectionTabPane" Grid.Column="0" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutomationProperties.AutomationId="GraphSelectionTabPane">
|
||||
<TabItem x:Name="testsTab" Header="{Binding Path=TitleTests}" AutomationProperties.AutomationId="TestsTab">
|
||||
<ContentControl x:Name="TestsRegion" prism:RegionManager.RegionName="ViewerTestsRegion2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
<TabItem x:Name="graphsTab" Header="{Binding Path=TitleGraphs}" AutomationProperties.AutomationId="GraphsTab">
|
||||
<ContentControl x:Name="GraphListRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphListRegion}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:TranslateExtension SettingsTitle}" Visibility="{Binding SettingsVisibility}" AutomationProperties.AutomationId="SettingsTab">
|
||||
<ContentControl x:Name="SettingsRegion" prism:RegionManager.RegionName="ViewerSettingsRegion2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
<TabItem Header="Legend" Visibility="Collapsed" AutomationProperties.AutomationId="LegendTab">
|
||||
<ContentControl x:Name="LegendRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerLegendRegion}"
|
||||
Height="Auto" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<GridSplitter Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" Width="5" ResizeBehavior="PreviousAndNext" ResizeDirection="Columns"/>
|
||||
<!-- Graph -->
|
||||
<ContentControl Grid.Column="2" Grid.Row="0" x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerGraphsRegion}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
|
||||
<TabControl Grid.Column="3" Grid.Row="0" Width="310" HorizontalAlignment="Right" VerticalAlignment="Stretch" AutomationProperties.AutomationId="ModificationTabPane">
|
||||
<TabItem x:Name="chartOptTab" Header="{strings:TranslateExtension ChartOptionsHeader}" AutomationProperties.AutomationId="ChartOptTab">
|
||||
<ContentControl x:Name="ChartOptionsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerChartOptionsRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" HorizontalContentAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
<TabItem x:Name="testModTab" Header="{strings:TranslateExtension ModificationsHeader}" IsSelected="{Binding ShowModifications}" AutomationProperties.AutomationId="TestModTab">
|
||||
<ContentControl x:Name="TestModificationRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerTestModificationRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TabControl Grid.Column="3" Grid.Row="0" MinWidth="300" Visibility="Collapsed" AutomationProperties.AutomationId="ChartTabPane">
|
||||
<TabItem>
|
||||
<ContentControl x:Name="DiagRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerDiagRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
|
||||
<ContentControl x:Name="StatsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerStatsRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<ContentControl x:Name="CursorRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerCursorRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right">
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<ContentControl x:Name="AddRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PropertyAddRegion}" Width="300" VerticalAlignment="Stretch" HorizontalAlignment="Right" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="{x:Type ContentControl}">
|
||||
<Grid>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using C1.WPF.Pdf;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using Prism.Events;
|
||||
using Prism.Ioc;
|
||||
// ReSharper disable CheckNamespace
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ViewerMainViewGrid.xaml
|
||||
/// </summary>
|
||||
public partial class ViewerMainViewGrid : IViewerMainViewGrid
|
||||
{
|
||||
|
||||
public ViewerMainViewGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += ViewerMainViewGrid_Loaded;
|
||||
}
|
||||
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private void SetFocus()
|
||||
{
|
||||
chartOptTab.IsSelected = true;
|
||||
chartOptTab.Focusable = true;
|
||||
chartOptTab.Focus();
|
||||
}
|
||||
//FB 14797 Subscribe to event after the page loaded to make sure eventAggregator is available
|
||||
private void ViewerMainViewGrid_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
_eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
_eventAggregator?.GetEvent<GraphLoadedCountNotification>().Subscribe(OnGraphLoadedCountNotification);
|
||||
}
|
||||
|
||||
//FB 14797 Set the focus to first tab (chartOptTab) after the graph is fully loaded (3 sec)
|
||||
private void OnGraphLoadedCountNotification(GraphLoadedCountNotificationArg arg)
|
||||
{
|
||||
if (null != DataContext && (IBaseViewModel)DataContext != arg.ParentVM) return;
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(TimeSpan.FromSeconds(3));
|
||||
Dispatcher.BeginInvoke((System.Action)SetFocus);
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns > 0 if successful, < 0 if failure, or 0 if the MainChart is not ready yet
|
||||
/// </summary>
|
||||
/// <param name="directory"></param>
|
||||
/// <param name="pdfFileName"></param>
|
||||
/// <returns></returns>
|
||||
public int SaveToPDF(string directory, string pdfFileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
//FB 29493 Error message in log before success message
|
||||
if (MainShell.DesiredSize.Height == 0 || MainShell.DesiredSize.Width == 0) return 0;
|
||||
if (string.IsNullOrEmpty(directory) || string.IsNullOrEmpty(pdfFileName) || !pdfFileName.EndsWith(".pdf")) return -1;
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(MainShell);
|
||||
// desired resolution:
|
||||
double dpiX = 300, dpiY = 300;
|
||||
var bmp = new RenderTargetBitmap((int)(bounds.Width * dpiX / 96.0), (int)(bounds.Height * dpiY / 96.0), dpiX, dpiY, PixelFormats.Pbgra32);
|
||||
bmp.Render(MainShell);
|
||||
var wBmp = new WriteableBitmap(bmp);
|
||||
|
||||
var pdf = new C1PdfDocument
|
||||
{
|
||||
Landscape = true,
|
||||
PageSize = new Size(MainShell.ActualWidth, MainShell.ActualHeight)
|
||||
};
|
||||
pdf.DrawImage(wBmp, new Rect(0, 0, MainShell.ActualWidth, MainShell.ActualHeight));
|
||||
pdf.Save(Path.Combine(directory, pdfFileName));
|
||||
|
||||
DTS.Common.Utils.PNGImageUtil.SaveImage(MainShell, System.IO.Path.Combine(directory, pdfFileName.Replace(".pdf", ".png")));
|
||||
return 1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.LogException(ex);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerShellView.xaml
Normal file
41
DTS Viewer/DTS.Viewer/Modules/Main/View/ViewerShellView.xaml
Normal file
@@ -0,0 +1,41 @@
|
||||
<base:BaseWindow x:Class="DTS.Viewer.ViewerShellView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
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"
|
||||
Background="Silver" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="1400" Height="1000" >
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<interactionRequest:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
|
||||
<dialogs:PopupWindowAction IsModal="True" StartupPosition="CenterScreen"/>
|
||||
</interactionRequest:InteractionRequestTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<base:BaseWindow.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<ResourceDictionary x:Key="ResourceDictionary">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Themes/Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
</base:BaseWindow.Resources>
|
||||
<StackPanel x:Name="MainShell" Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl x:Name="MainRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.MainRegion}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
|
||||
<ContentControl.Template>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</ControlTemplate>
|
||||
</ContentControl.Template>
|
||||
</ContentControl>
|
||||
</StackPanel>
|
||||
</base:BaseWindow>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DTS.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ShellView.xaml
|
||||
/// </summary>
|
||||
public partial class ViewerShellView : IViewerShellView
|
||||
{
|
||||
public ViewerShellView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user