| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 | <UserControl x:Class="PunkHPX8_MainPages.Views.DataHistoryView"             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:PunkHPX8_MainPages.Views"             mc:Ignorable="d"              xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"              xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"             xmlns:prism="http://prismlibrary.com/"             prism:ViewModelLocator.AutoWireViewModel="True"             xmlns:ctrls="clr-namespace:PunkHPX8_Themes.UserControls;assembly=PunkHPX8_Themes"                       d:DesignHeight="450" d:DesignWidth="800" x:Name="dataHistoryView">    <i:Interaction.Triggers>        <i:EventTrigger EventName="Loaded">            <i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding ElementName=dataHistoryView}"/>        </i:EventTrigger>        <i:EventTrigger EventName="Unloaded">            <i:InvokeCommandAction Command="{Binding UnLoadCommand}"/>        </i:EventTrigger>    </i:Interaction.Triggers>    <Grid>        <Grid.ColumnDefinitions>            <ColumnDefinition Width="auto"/>            <ColumnDefinition />        </Grid.ColumnDefinitions>        <Expander  ExpandDirection="Left">            <StackPanel>                <StackPanel>                    <TextBlock Text="Start Time:" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" Margin="5,0,0,0"/>                    <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="40" HorizontalAlignment="Left">                        <wf:DateTimePicker x:Name="wfTimeFrom" Value="2011-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>                    </wfi:WindowsFormsHost>                    <TextBlock Text="End Time:" Width="70" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" Margin="5,0,0,0"/>                    <wfi:WindowsFormsHost Margin="5,0,0,0" FontSize="14" FontFamily="Arial" Width="170" Height="22" HorizontalAlignment="Left">                        <wf:DateTimePicker x:Name="wfTimeTo" Value="2013-8-1" CustomFormat="yyyy/MM/dd HH:mm:ss" Format="Custom"></wf:DateTimePicker>                    </wfi:WindowsFormsHost>                    <StackPanel Orientation="Horizontal">                        <Button Content="Search" Command="{Binding StartCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0" IsEnabled="{Binding ElementName=TimeDataCheckBox,Path=IsChecked,Converter={StaticResource BoolToBool}}"/>                        <Button Content="Clear" Command="{Binding  ClearCommand}" Width="80" Height="20" HorizontalAlignment="Left" Margin="5,10,0,0"/>                    </StackPanel>                </StackPanel>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">                    <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}"  Canvas.Top="100" Height="450" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling">                    <TreeView.ItemTemplate>                        <HierarchicalDataTemplate  ItemsSource="{Binding ChildNodes}">                            <StackPanel Orientation="Horizontal">                                <CheckBox IsChecked="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >                                    <i:Interaction.Triggers>                                        <i:EventTrigger EventName="Click">                                            <i:InvokeCommandAction  Command="{Binding DataContext.ParameterCheckCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}" CommandParameter="{Binding }"/>                                        </i:EventTrigger>                                    </i:Interaction.Triggers>                                </CheckBox>                                <TextBlock Text="{Binding Name}"  />                            </StackPanel>                        </HierarchicalDataTemplate>                    </TreeView.ItemTemplate>                </TreeView>                </Border>                <ListBox  ItemsSource="{Binding KeyDataObservableCollection}"  Margin="20,0,0,0" FontSize="20" Height="200" VerticalAlignment="Bottom">                    <ListBox.ItemTemplate>                        <DataTemplate>                            <StackPanel Orientation="Horizontal">                                <TextBlock Text="{Binding Key}" Width="300"/>                                <Button  Width="42" FontSize="11"  Height="20"  Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor" Tag="{Binding UniqueId}"/>                            </StackPanel>                        </DataTemplate>                    </ListBox.ItemTemplate>                </ListBox>                <!--<DataGrid Style="{x:Null}" Grid.Row="1" x:Name="dataGrid_DataList" AutoGenerateColumns="False" Background="#FFD6D6D6"                            ItemsSource="{Binding KeyDataObservableCollection, Mode=TwoWay}"  SelectionUnit="FullRow" CanUserResizeRows="False" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserDeleteRows="True" CanUserAddRows="False" Focusable="False" HorizontalGridLinesBrush="Gray" VerticalGridLinesBrush="Gray" HeadersVisibility="Column" Margin="0,5,0,0" Height="200">                    <DataGrid.Columns>                        <DataGridTextColumn Width="Auto" Binding="{Binding Key,Mode=TwoWay}"  CanUserSort="False" IsReadOnly="True">                            <DataGridTextColumn.CellStyle>                                <Style TargetType="DataGridCell">                                    <Setter Property="ToolTip" Value="{Binding Key}" />                                </Style>                            </DataGridTextColumn.CellStyle>                            <DataGridTextColumn.HeaderTemplate >                                <DataTemplate>                                    <TextBlock Text="Name"/>                                </DataTemplate>                            </DataGridTextColumn.HeaderTemplate>                        </DataGridTextColumn>                        <DataGridTemplateColumn Width="Auto" CanUserSort="True">                            <DataGridTemplateColumn.CellTemplate>                                <DataTemplate>                                    <Button Focusable="False" Width="42" FontSize="11"  Height="20" Tag="{Binding UniqueId}" Background="{Binding Color,UpdateSourceTrigger=PropertyChanged}" Click="OnChangeLineColor"/>                                </DataTemplate>                            </DataGridTemplateColumn.CellTemplate>                            <DataGridTemplateColumn.HeaderTemplate >                                <DataTemplate>                                    <TextBlock Text="Color" />                                </DataTemplate>                            </DataGridTemplateColumn.HeaderTemplate>                        </DataGridTemplateColumn>                    </DataGrid.Columns>                </DataGrid>-->            </StackPanel>        </Expander>        <Grid Grid.Column="1">            <Grid.RowDefinitions>                <RowDefinition Height="60"/>                <RowDefinition/>            </Grid.RowDefinitions>            <!--<Border BorderThickness="1" BorderBrush="Black"  Margin="50,5,20,5">-->                <StackPanel Orientation="Horizontal">                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="AutoX Zoom"     x:Name="AutoXCheckBox"/>                <CheckBox    HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="AutoY Zoom"     x:Name="AutoYCheckBox"/>                <CheckBox   HorizontalAlignment="Center" FontSize="20" Padding="3,-5,0,0" Margin="100,25,0,0" Content="Real-Time Data"     x:Name="TimeDataCheckBox">                    <i:Interaction.Triggers>                        <i:EventTrigger EventName="Checked">                            <i:InvokeCommandAction  Command="{Binding StartRealTimeCommand}" CommandParameter="{Binding ElementName=TimeDataCheckBox}"/>                        </i:EventTrigger>                        <i:EventTrigger EventName="Unchecked">                            <i:InvokeCommandAction  Command="{Binding StopRealTimeCommand}"/>                        </i:EventTrigger>                    </i:Interaction.Triggers>                </CheckBox>            </StackPanel>            <!--</Border>-->            <ctrls:DrawGraphicsControl  x:Name="MyDrawGraphicsControl" Grid.Row="1" IsHorizontalNavigationEnabled="{Binding ElementName=AutoXCheckBox,Path=IsChecked}" IsVerticalNavigationEnabled="{Binding ElementName=AutoYCheckBox,Path=IsChecked}" WavePlotOriginX="{Binding ElementName=MinXTextBox,Path=Text}" WavePlotOriginWidth="{Binding ElementName=MaxXTextBox,Path=Text}" WavePlotOriginY="{Binding ElementName=MinYTextBox,Path=Text}" WavePlotOriginHeight="{Binding ElementName=MaxYTextBox,Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  IsHorizontalDateTimeAxis="True" Background="{DynamicResource DataGrid_BG_First}" Margin="5"/>        </Grid>    </Grid></UserControl>
 |