PgBorderSearch.xaml 35.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
<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=grid_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>
                                                        <!--#0边界范围-->
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected}"
                                                                     Value="{Binding Sensor0AtBorderBegin}" SectionWidth="{Binding  Sensor0AtBorderWidth}"/>
                                                        <!--#1边界范围-->
                                                        <lvc:AxisSection Style="{StaticResource Styles.Axis.Section.Selected}"
                                                                     Value="{Binding Sensor1AtBorderBegin}" SectionWidth="{Binding  Sensor1AtBorderWidth}"/>
                                                        <!--图表缩放.选择器.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>