init
This commit is contained in:
@@ -0,0 +1,333 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.PSDReport.PSDReportMainView"
|
||||
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: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:interactionRequest="clr-namespace:DTS.Common.Interactivity;assembly=DTS.Common"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="Auto" Height="Auto" >
|
||||
|
||||
<base:BaseView.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<converters:WidthConverter x:Key="WidthConverter" />
|
||||
</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, 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="{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="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.PSDReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PSDReportMainView.xaml
|
||||
/// </summary>
|
||||
public partial class PSDReportMainView : IPSDReportMainView
|
||||
{
|
||||
|
||||
public PSDReportMainView()
|
||||
{
|
||||
|
||||
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");
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.PSDReport.PSDReportMainViewGrid"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DTS.Viewer.PSDReport"
|
||||
mc:Ignorable="d"
|
||||
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.PSDReport"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
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" 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" 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="{strings:TranslateExtension SettingsTitle}" Visibility="Collapsed" AutomationProperties.AutomationId="SettingsTab">
|
||||
|
||||
</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"/>
|
||||
<!-- Graphs -->
|
||||
<Grid Grid.Column="2" Grid.Row="0" x:Name="GraphsGrid" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Header="{strings:Translate DataSelectionHeader}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentControl x:Name="DataSelectRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PSDDataSelectRegion}" 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>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Header="{strings:Translate PSDHeader}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentControl x:Name="GraphRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.PSDGraphRegion}" 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>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
<!-- Results/Settings -->
|
||||
<TabControl Grid.Column="3" Grid.Row="0" Width="310" HorizontalAlignment="Right" VerticalAlignment="Stretch" AutomationProperties.AutomationId="SettingsTabPane">
|
||||
<TabItem x:Name="chartResultsTab" Header="{strings:TranslateExtension PSDResultsHeader}" AutomationProperties.AutomationId="ChartResTab">
|
||||
<ContentControl x:Name="ReportResultsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ReportResultsRegion}" 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="psdSettingsTab" Header="{strings:TranslateExtension PSDSettingsHeader}" AutomationProperties.AutomationId="psdSettingsTab">
|
||||
<ContentControl x:Name="SettingsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ViewerSettingsRegion}" 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="chartOptTab" Header="{strings:TranslateExtension ChartOptionsHeader}" Visibility="Collapsed" AutomationProperties.AutomationId="ChartOptTab">
|
||||
<StackPanel>
|
||||
<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>
|
||||
<ContentControl x:Name="ReportChartOptionsRegion" prism:RegionManager.RegionName="{x:Static classes:RegionNames.ReportChartOptionsRegion}" 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>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,48 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Viewer.PSDReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PSDReportMainViewGrid.xaml
|
||||
/// </summary>
|
||||
public partial class PSDReportMainViewGrid : IPSDReportMainViewGrid
|
||||
{
|
||||
public PSDReportMainViewGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += PSDReportMainViewGrid_Loaded;
|
||||
}
|
||||
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private void SetFocus()
|
||||
{
|
||||
chartResultsTab.IsSelected = true;
|
||||
chartResultsTab.Focusable = true;
|
||||
chartResultsTab.Focus();
|
||||
}
|
||||
//FB 14797 Subscribe to event after the page loaded to make sure eventAggregator is available
|
||||
private void PSDReportMainViewGrid_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((Action)SetFocus);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user