<Page x:Class="FLY.Thick.Base.UI.PgBorderSearch"
      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:FLY.Thick.Base.UI"
      xmlns:misc="clr-namespace:Misc;assembly=MISC" 
      xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" 
      xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls" 
      xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:conv="clr-namespace:FLY.Thick.Base.UI.Converter"
      mc:Ignorable="d" 
      d:DesignWidth="1280"
      
	Title="Page_BorderSearch">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/GraphStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <local:IntConverter x:Key="intconv" />
            <conv:Pos2mmConverter x:Key="p2mmconv" />
            <local:PgBorderSearchVm x:Key="viewModel" />
        </ResourceDictionary>
    </Page.Resources>
    <Grid x:Name="grid_root" Background="{StaticResource Brushes.Card.Background}" d:DataContext="{StaticResource viewModel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Name="grid_initparam" DataContext="{Binding InitParamService}"/>

        <Grid Background="{StaticResource Brushes.TitleBar.Background}" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" >
                <Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"  >
                    <iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
                </Button>
                <TextBlock Style="{StaticResource Styles.TitleBar.Text}"  Text="{StaticResource str.PgBorderSearch.Title}"/>
            </StackPanel>
            <local:CtMicroGage Grid.Column="1" x:Name="mircoGage" Background="Transparent" VerticalAlignment="Bottom"/>
        </Grid>
        <ScrollViewer CanContentScroll="False" PanningMode="Both" Grid.Row="1" >
            <StackPanel Margin="{StaticResource ControlMargin}">
                <Border Style="{StaticResource Styles.Card.Border}">
                    <StackPanel>
                        <TextBlock Style="{StaticResource Styles.Card.Title}" Text="{StaticResource str.PgBorderSearch.Param}"/>
                        <StackPanel Grid.Column="1">

                            <StackPanel Margin="{StaticResource ControlMargin}" Visibility="{Binding DataContext.HasHold, ElementName=grid_initparam, Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}">
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.ValidRange}" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Valid.Begin}" />
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="-"/>
                                    <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Valid.End}" MinWidth="30" MaxWidth="120"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Valid.Begin" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                            <Run Text="-"/>
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Valid.End" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>

                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.Enable}" />
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding Enable}" HorizontalAlignment="Left"/>
                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.IsOneMaterial}" />
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding IsOneMaterial}" HorizontalAlignment="Left"/>
                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.IsBreakDetect}" />
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding IsBreakDetect}" HorizontalAlignment="Left"/>
                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.TempADBySet}" />
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding TempADBySet}" HorizontalAlignment="Left"/>
                                </StackPanel>
                                <Grid>
                                    <StackPanel  Margin="{StaticResource ControlMargin}" Visibility="{Binding TempADBySet, Converter={StaticResource visbilityconv},ConverterParameter=CollapsedWhenTrue}">
                                        <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.PgBorderSearch.TempAD}" />
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding TempAD}" />
                                    </StackPanel>
                                    <StackPanel  Margin="{StaticResource ControlMargin}" Visibility="{Binding TempADBySet, Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
                                        <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.TempAD}" />
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding TempAD}" />
                                    </StackPanel>
                                </Grid>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}">
                                <Run Text="{StaticResource str.PgBorderSearch.TempRange}"/>%
                                    </TextBlock>
                                    <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" IsChecked="{Binding IsTempRangeByPercent}" HorizontalAlignment="Left"/>
                                </StackPanel>
                                <StackPanel Margin="{StaticResource ControlMargin}" >
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.TempRange}" />
                                    <Grid>
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding TempRange}" Visibility="{Binding IsTempRangeByPercent, Converter={StaticResource visbilityconv},ConverterParameter=CollapsedWhenTrue}"/>
                                        <StackPanel Orientation="Horizontal" Visibility="{Binding IsTempRangeByPercent, Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
                                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding TempRangePercent,Converter={StaticResource percentconv}}"/>
                                            <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%"/>
                                        </StackPanel>
                                    </Grid>
                                </StackPanel>

                            </StackPanel>
                            <WrapPanel Orientation="Horizontal">
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.Filter}" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding N}" />
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F1}">
                                    <Binding Path="N" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                        </TextBlock>
                                    </StackPanel>


                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.SensorWidth}" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding SensorWidth}" />
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F1}">
                                        <Binding Path="SensorWidth" />
                                        <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                    </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                        </TextBlock>
                                    </StackPanel>


                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.Trim}" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding N2}" />
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F1}">
                                        <Binding Path="N2" />
                                        <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                    </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                        </TextBlock>
                                    </StackPanel>


                                </StackPanel>
                                <StackPanel  Margin="{StaticResource ControlMargin}">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.Expand}" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding N3}" />
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                        <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F1}">
                                        <Binding Path="N3" />
                                        <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                    </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                        </TextBlock>
                                    </StackPanel>


                                </StackPanel>
                            </WrapPanel >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                <Button Style="{StaticResource Styles.Button.Square.Accent2}" Content="{StaticResource str.PgBorderSearch.Apply}" Command="{Binding ApplyCmd}"/>
                            </StackPanel>
                        </StackPanel >
                    </StackPanel>
                </Border>
                <Border Style="{StaticResource Styles.Card.Border}">
                    <StackPanel>
                        <TextBlock Style="{StaticResource Styles.Card.Title}" Text="{StaticResource str.PgBorderSearch.scanChart}"/>
                        <WrapPanel Orientation="Horizontal" DataContext="{Binding BorderSearchService}">
                            <StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
                                <TextBlock Text="{StaticResource str.PgBorderSearch.ForwBorder}" >
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding DataContext.Direction,ElementName=grid_root}" Value="{x:Static misc:DIRECTION.FORWARD}">
                                                    <Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Validation5}"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}">
                        <Run Text="{Binding Border_Forw.Begin, Converter={StaticResource intconv}, Mode=OneWay}"/>
                        <Run Text="-"/>
                        <Run Text="{Binding Border_Forw.End, Converter={StaticResource intconv}, Mode=OneWay}"/>
                                    </TextBlock>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run>
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Border_Forw.Begin" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                            <Run Text="-"/>
                            <Run>
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Border_Forw.End" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>

                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
                                <TextBlock Text="{StaticResource str.PgBorderSearch.BackwBorder}" >
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding DataContext.Direction,ElementName=root}" Value="{x:Static misc:DIRECTION.BACKWARD}">
                                                    <Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Validation5}"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}">
                        <Run Text="{Binding Border_Backw.Begin, Converter={StaticResource intconv}, Mode=OneWay}"/>
                        <Run Text="-"/>
                        <Run Text="{Binding Border_Backw.End, Converter={StaticResource intconv}, Mode=OneWay}"/>
                                    </TextBlock>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run>
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Border_Backw.Begin" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                            <Run Text="-"/>
                            <Run>
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Border_Backw.End" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>

                            </StackPanel>
                            <StackPanel Orientation="Horizontal"  Margin="{StaticResource ControlMargin}">
                                <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.PgBorderSearch.Width}" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}">
                                <Run Text="{Binding Width,Mode=OneWay}"/>
                                    </TextBlock>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
                                    <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
                            <Run >
                                <MultiBinding Converter="{StaticResource p2mmconv}" Mode="OneWay" StringFormat="{}{0:F0}">
                                    <Binding Path="Width" />
                                    <Binding Path="DataContext.Encoder1_mmpp" ElementName="grid_initparam"/>
                                </MultiBinding>
                            </Run>
                            <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>

                            </StackPanel>
                        </WrapPanel>
                        <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <Grid Margin="{StaticResource ControlMargin}">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition Height="auto"/>
                                </Grid.RowDefinitions>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition/>
                                        <ColumnDefinition Width="auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition Height="auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid>
                                        <lvc:CartesianChart x:Name="chart" Hoverable="False" DisableAnimations="True" DataTooltip="{x:Null}" MinHeight="250">
                                            <lvc:CartesianChart.AxisX>
                                                <lvc:Axis LabelFormatter="{Binding XFormatter}" 
                                      Foreground="{StaticResource MahApps.Brushes.ThemeForeground}"
                                      MaxValue="{Binding ZoomInHelper.XRangeSlider.Max}" MinValue="{Binding ZoomInHelper.XRangeSlider.Min}"
                                      >
                                                    <lvc:Axis.Separator>
                                                        <lvc:Separator Stroke="{StaticResource MahApps.Brushes.Gray2}" StrokeDashArray="3"  />

                                                    </lvc:Axis.Separator>
                                                    <lvc:Axis.Sections>
                                                        <!--图表缩放.选择器.X轴-->
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected.ZoomIn}"
                                                                 Value="{Binding ZoomInHelper.SelectedXBegin}" />
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected.ZoomIn}"
                                                                 Value="{Binding ZoomInHelper.SelectedXEnd}" />
                                                    </lvc:Axis.Sections>
                                                </lvc:Axis>
                                            </lvc:CartesianChart.AxisX>
                                            <lvc:CartesianChart.AxisY>
                                                <lvc:Axis LabelFormatter="{Binding YFormatter}" MaxValue="{Binding ZoomInHelper.YRangeSlider.Max}" MinValue="{Binding ZoomInHelper.YRangeSlider.Min}"
                                      Foreground="{StaticResource MahApps.Brushes.ThemeForeground}" FontFamily="Courier New">
                                                    <lvc:Axis.Separator>
                                                        <lvc:Separator Stroke="{StaticResource MahApps.Brushes.Gray2}" StrokeDashArray="3"  />
                                                    </lvc:Axis.Separator>
                                                    <lvc:Axis.Sections>
                                                        <!--图表缩放.选择器.Y轴-->
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected.ZoomIn}"
                                                                 Value="{Binding ZoomInHelper.SelectedYBegin}"/>
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected.ZoomIn}"
                                                                 Value="{Binding ZoomInHelper.SelectedYEnd}" />
                                                    </lvc:Axis.Sections>
                                                </lvc:Axis>
                                            </lvc:CartesianChart.AxisY>
                                            <lvc:CartesianChart.Series>
                                                <lvc:LineSeries 
                                        Title="Values"
                                        Values="{Binding Values}"
                                        StrokeThickness = "3"
                                        
                                        Fill = "Transparent"
                                        PointGeometry ="{x:Null}"/>
                                            </lvc:CartesianChart.Series>
                                        </lvc:CartesianChart>
                                    </Grid>
                                    <!--图表缩放.拖动条.X轴-->
                                    <Controls:RangeSlider Grid.Row="1"
                                                  Style="{StaticResource MahApps.Styles.RangeSlider}" 
                                                  Margin="{StaticResource ControlMargin}"
                                                  Controls:SliderHelper.ChangeValueBy="LargeChange"
                                                  Controls:SliderHelper.EnableMouseWheel="None"
                                                  AutoToolTipPlacement="TopLeft"
                                                  Orientation="Horizontal"
                                                  LargeChange="10"
                                                  SmallChange="1"
                                                  Maximum="{Binding ZoomInHelper.XRangeSlider.SliderMax}"
                                                  Minimum="{Binding ZoomInHelper.XRangeSlider.SliderMin}"
                                                  LowerValue="{Binding ZoomInHelper.XRangeSlider.SliderLowerValue}"
                                                  UpperValue="{Binding ZoomInHelper.XRangeSlider.SliderUpperValue}" />
                                    <!--图表缩放.拖动条.Y轴-->
                                    <Controls:RangeSlider Grid.Column="1"
                                                  Style="{StaticResource MahApps.Styles.RangeSlider}" 
                                                  Margin="{StaticResource ControlMargin}"
                                                  Controls:SliderHelper.ChangeValueBy="LargeChange"
                                                  Controls:SliderHelper.EnableMouseWheel="None"
                                                  AutoToolTipPlacement="TopLeft"
                                                  Orientation="Vertical"
                                                  LargeChange="10"
                                                  SmallChange="1"
                                                  Maximum="{Binding ZoomInHelper.YRangeSlider.SliderMax}"
                                                  Minimum="{Binding ZoomInHelper.YRangeSlider.SliderMin}"
                                                  LowerValue="{Binding ZoomInHelper.YRangeSlider.SliderLowerValue}"
                                                  UpperValue="{Binding ZoomInHelper.YRangeSlider.SliderUpperValue}" />
                                    <!--图表缩放.按钮.全屏-->
                                    <Button Style="{StaticResource Styles.Button.Icon.Small}" 
                                    Grid.Row="1" Grid.Column="1"
                                    Command="{Binding ZoomInHelper.FullscreenCmd}">
                                        <iconPacks:PackIconMaterial Kind="Fullscreen"  Width="22"/>
                                    </Button>
                                </Grid>
                            </Grid>



                            <Border Grid.Row="1" >
                                <StackPanel>
                                    <StackPanel Grid.Row="1" Orientation="Horizontal">
                                        <!--图表缩放.输入框.X轴范围-->
                                        <StackPanel Margin="{StaticResource ControlMargin}" Orientation="Horizontal">
                                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.XRange}" />
                                            <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
                                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" 
                                                 Text="{Binding ZoomInHelper.XRangeSlider.SliderLowerValue,StringFormat={}{0:F0}}" />

                                                <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="-" />
                                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" 
                                                 Text="{Binding ZoomInHelper.XRangeSlider.SliderUpperValue,StringFormat={}{0:F0}}" />


                                            </StackPanel>
                                        </StackPanel>
                                        <!--图表缩放.输入框.Y轴范围-->
                                        <StackPanel Margin="{StaticResource ControlMargin}" Orientation="Horizontal">
                                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="{StaticResource str.PgBorderSearch.YRange}" />
                                            <StackPanel Orientation="Horizontal" >
                                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" 
                                                 Text="{Binding ZoomInHelper.YRangeSlider.SliderLowerValue,StringFormat={}{0:F0}}" />
                                                <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="-" />
                                                <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" 
                                                 Text="{Binding ZoomInHelper.YRangeSlider.SliderUpperValue,StringFormat={}{0:F0}}" />
                                            </StackPanel>
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <!--图表缩放.按钮.放大-->
                                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}"
                                        Command="{Binding ZoomInHelper.ZoomInCmd}" >
                                                <iconPacks:PackIconMaterial Kind="MagnifyPlus" />
                                            </Button>
                                            <!--图表缩放.按钮.缩小-->
                                            <Button Style="{StaticResource Styles.Button.Icon.Rectangle}"
                                        Command="{Binding ZoomInHelper.ZoomOutCmd}" >
                                                <iconPacks:PackIconMaterial Kind="MagnifyMinus" />
                                            </Button>
                                        </StackPanel>
                                    </StackPanel>
                                </StackPanel>

                            </Border>
                        </Grid>
                    </StackPanel>
                </Border>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</Page>
