<UserControl x:Class="Txgy.EWS.Client.PageModule.Views.EarlyWarningView"
             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:Txgy.EWS.Client.PageModule.Views"
             xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:lcusb="http://schemas.arction.com/ChartingMVVM/ultimate/"
             xmlns:prism="http://prismlibrary.com/"
             xmlns:myuc="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
             xmlns:comm="clr-namespace:Txgy.EWS.Client.Common;assembly=Txgy.EWS.Client.Common"
             xmlns:converter="clr-namespace:Txgy.EWS.Client.Common.Converters;assembly=Txgy.EWS.Client.Common"
             xmlns:txgycontrols="clr-namespace:Txgy.Controls;assembly=Txgy.Controls"
             xmlns:global="clr-namespace:Txgy.EWS.Client.Common;assembly=Txgy.EWS.Client.Common"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             prism:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="980"
             d:DesignWidth="1690"
             mc:Ignorable="d">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <converter:Bool2BlurConverter x:Key="Bool2Blur" />
                    <converter:Bool2VisibilityConverter x:Key="Bool2Visibility" />
                    <converter:Absolute2RelativeConverter x:Key="a2r" />
                </ResourceDictionary>
                <ResourceDictionary Source="/Txgy.EWS.Client.Assets;component/Styles/BaseResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <converter:String2ColorConverter x:Key="s2c" />
            <converter:SourceCharaInt2StringConverter x:Key="sourceCharaIntToStringConverter" />
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid Effect="{Binding Path=(comm:GlobalConfig.IsInitializing), Converter={StaticResource Bool2Blur}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="400" MinWidth="400" />
                <ColumnDefinition />
                <ColumnDefinition Width="420" MinWidth="420" />
            </Grid.ColumnDefinitions>
            <!--#region 图表-->
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition Height="300" MinHeight="300" />
                </Grid.RowDefinitions>
                <!--#region 事件频度图-->
                <md:Card Margin="5"
                         md:ThemeAssist.Theme="Light"
                         UniformCornerRadius="5">
                    <Grid>
                        <TextBlock Margin="5"
                                   Text="近一小时事件频度"
                                   FontFamily="微软雅黑"
                                   FontSize="16" />
                        <lvc:CartesianChart Margin="5,25,5,5">
                            <lvc:CartesianChart.Series>
                                <lvc:LineSeries Stroke="#2980b9"
                                                Fill="Transparent"
                                                PointGeometrySize="0"
                                                Values="{Binding ListEventFre}" />

                            </lvc:CartesianChart.Series>
                            <lvc:CartesianChart.AxisX>
                                <lvc:Axis MinValue="0"
                                          ShowLabels="True"
                                          MaxValue="20"
                                          Labels="{Binding EventFreLabels, UpdateSourceTrigger=PropertyChanged}">
                                    <lvc:Axis.Separator>
                                        <lvc:Separator Step="5" Stroke="Transparent">
                                        </lvc:Separator>
                                    </lvc:Axis.Separator>
                                </lvc:Axis>
                            </lvc:CartesianChart.AxisX>
                            <lvc:CartesianChart.AxisY>
                                <lvc:Axis MinValue="0"
                                          MaxValue="{Binding EventFreMaxY}"
                                          ShowLabels="True">
                                    <lvc:Axis.Separator>
                                        <lvc:Separator Stroke="Transparent" />
                                    </lvc:Axis.Separator>
                                </lvc:Axis>
                            </lvc:CartesianChart.AxisY>
                        </lvc:CartesianChart>
                    </Grid>
                </md:Card>
                <!--#endregion-->
                <!--#region 图表-->
                <Grid Grid.Row="1" Margin="5,5,5,0">
                    <!--<Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>-->
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <!--#region 震级-->
                    <md:Card Grid.Column="0"
                             Margin="0,0,0,0"
                             md:ThemeAssist.Theme="Light"
                             UniformCornerRadius="5">
                        <Grid>
                            <TextBlock Margin="5"
                                       Text="震级变化"
                                       FontFamily="微软雅黑"
                                       FontSize="16" />
                            <lvc:CartesianChart Margin="5,25,5,5">
                                <lvc:CartesianChart.Series>
                                    <lvc:LineSeries Stroke="#4a89dc"
                                                    Fill="Transparent"
                                                    PointGeometrySize="0"
                                                    Values="{Binding ListML}" />
                                </lvc:CartesianChart.Series>
                                <lvc:CartesianChart.AxisX>
                                    <lvc:Axis MinValue="0"
                                              ShowLabels="True"
                                              MaxValue="20"
                                              Labels="{Binding EventMLLabels}">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Step="5" Stroke="Transparent">
                                            </lvc:Separator>
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisX>
                                <lvc:CartesianChart.AxisY>
                                    <lvc:Axis MinValue="-3"
                                              MaxValue="0"
                                              ShowLabels="True">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Stroke="Transparent" />
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisY>
                            </lvc:CartesianChart>
                        </Grid>
                    </md:Card>
                    <!--#endregion-->

                    <!--#region 主频-->
                    <md:Card Grid.Row="1"
                             Margin="0,5,0,0"
                             md:ThemeAssist.Theme="Light"
                             UniformCornerRadius="5">
                        <Grid>
                            <TextBlock Margin="5"
                                       Text="能量变化"
                                       FontFamily="微软雅黑"
                                       FontSize="16" />
                            <lvc:CartesianChart Margin="5,25,5,5"
                                                Hoverable="False"
                                                DataTooltip="{x:Null}">
                                <lvc:CartesianChart.Series>
                                    <lvc:LineSeries Width="1"
                                                    Stroke="#d770ad"
                                                    Fill="Transparent"
                                                    PointGeometrySize="0"
                                                    Values="{Binding ListEnergy}" />
                                </lvc:CartesianChart.Series>
                                <lvc:CartesianChart.AxisX>
                                    <lvc:Axis MinValue="0"
                                              ShowLabels="True"
                                              MaxValue="20"
                                              Labels="{Binding EventDominantFreqLabels}">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Step="5" Stroke="Transparent">
                                            </lvc:Separator>
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisX>
                                <lvc:CartesianChart.AxisY>
                                    <lvc:Axis MinValue="0" ShowLabels="True">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Stroke="Transparent" />
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisY>
                            </lvc:CartesianChart>
                        </Grid>
                    </md:Card>
                    <!--#endregion-->
                    <!--#region 应力降-->
                    <md:Card Grid.Row="2"
                             Margin="0,5,0,0"
                             md:ThemeAssist.Theme="Light"
                             UniformCornerRadius="5">
                        <Grid>
                            <TextBlock Margin="5"
                                       Text="主频变化"
                                       FontFamily="微软雅黑"
                                       FontSize="16" />
                            <lvc:CartesianChart Margin="5,25,5,5"
                                                Hoverable="False"
                                                DataTooltip="{x:Null}">
                                <lvc:CartesianChart.Series>
                                    <lvc:LineSeries Stroke="#e74c3c"
                                                    Fill="Transparent"
                                                    PointGeometrySize="0"
                                                    Values="{Binding ListDominantFreq}" />
                                </lvc:CartesianChart.Series>
                                <lvc:CartesianChart.AxisX>
                                    <lvc:Axis MinValue="0"
                                              ShowLabels="True"
                                              MaxValue="20"
                                              Labels="{Binding EventDominantFreqLabels}">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Step="5" Stroke="Transparent">
                                            </lvc:Separator>
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisX>
                                <lvc:CartesianChart.AxisY>
                                    <lvc:Axis MinValue="0" ShowLabels="True">
                                        <lvc:Axis.Separator>
                                            <lvc:Separator Stroke="Transparent" />
                                        </lvc:Axis.Separator>
                                    </lvc:Axis>
                                </lvc:CartesianChart.AxisY>
                            </lvc:CartesianChart>
                        </Grid>
                    </md:Card>
                    <!--#endregion-->
                </Grid>
                <!--#endregion-->
                <!--#region 预警平面-->
                <md:Card Grid.Row="2"
                         Margin="5"
                         md:ThemeAssist.Theme="Light"
                         UniformCornerRadius="5">
                    <StackPanel>
                        <Grid Width="60" Margin="0,30,0,0">
                            <Ellipse x:Name="WarningStat"
                                     Width="60"
                                     Height="60"
                                     Margin="0,20,0,0"
                                     d:Fill="Yellow"
                                     StrokeThickness="1"
                                     Stroke="blue"
                                     Fill="{Binding Path=(comm:GlobalData.CurAlarmLevelColor)}">
                                <Ellipse.Effect>
                                    <BlurEffect Radius="1" />
                                </Ellipse.Effect>
                            </Ellipse>
                            <TextBlock Margin="5,35,0,0"
                                       d:Foreground="Blue"
                                       Text="预警等级"
                                       Foreground="White"
                                       FontSize="12" />
                            <TextBlock Margin="24,50,0,0"
                                       d:Foreground="Blue"
                                       d:Text="1"
                                       Text="{Binding Path=(comm:GlobalData.CurAlarmLevelValue)}"
                                       Foreground="White"
                                       FontSize="24" />
                        </Grid>
                        <StackPanel Grid.Row="1"
                                    Margin="0,10,0,0"
                                    HorizontalAlignment="Center"
                                    Orientation="Horizontal">
                            <TextBlock VerticalAlignment="Center"
                                       Text="中等能量事件数量："
                                       FontSize="20" />
                            <TextBlock d:Text="10"
                                       FontSize="28"
                                       Text="{Binding Path=(comm:GlobalData.MidEventCount)}" />
                        </StackPanel>
                        <StackPanel Grid.Row="2"
                                    Margin="0,10,0,0"
                                    HorizontalAlignment="Center"
                                    Orientation="Horizontal">
                            <TextBlock VerticalAlignment="Center"
                                       Text="平面数量："
                                       FontSize="20" />
                            <TextBlock d:Text="10"
                                       FontSize="28"
                                       Text="{Binding Path=(comm:GlobalData.AlarmPlanCount)}" />
                        </StackPanel>
                    </StackPanel>
                </md:Card>
                <!--#endregion-->
            </Grid>
            <!--#endregion-->
            <!--#region 平面图-->
            <md:Card x:Name="planCard"
                     Grid.Column="1"
                     Margin="5"
                     md:ThemeAssist.Theme="Light"
                     UniformCornerRadius="5">
                <Grid>
                    <Canvas x:Name="right"
                            Background="White"
                            MouseWheel="Canvas_MouseWheel"
                            MouseLeftButtonDown="Canvas_MouseLeftButtonDown"
                            MouseLeftButtonUp="Canvas_MouseLeftButtonUp"
                            MouseRightButtonDown="right_MouseRightButtonDown"
                            MouseRightButtonUp="right_MouseRightButtonUp"
                            MouseMove="Canvas_MouseMove"
                            MouseLeave="right_MouseLeave"
                            ClipToBounds="True">
                        <Viewbox Name="mainView"
                                 Canvas.Left="0"
                                 Canvas.Top="0">
                            <Canvas x:Name="canvas"
                                    Width="890"
                                    Height="980"
                                    ClipToBounds="True"
                                    ToolTipService.ShowDuration="0">
                                <Canvas.ToolTip>
                                    <ToolTip x:Name="tip"
                                             PlacementTarget="{Binding ElementName=canvas}"
                                             Content=""
                                             FontSize="16"
                                             Visibility="Collapsed">
                                    </ToolTip>
                                </Canvas.ToolTip>
                            </Canvas>
                        </Viewbox>
                    </Canvas>
                    <myuc:ColorMapBar Width="56"
                                      Height="120"
                                      Margin="0,0,5,10"
                                      HorizontalAlignment="Right"
                                      VerticalAlignment="Bottom"
                                      TopDepth="200"
                                      BottomDepth="900"
                                      UcWidth="20" />
                </Grid>
            </md:Card>
            <!--#endregion-->
            <!--#region 事件列表-->
            <!--<TextBlock Grid.Column="2"
                   d:Text="123"
                   Text="{Binding TestText}"
                   FontSize="40" />-->
            <md:Card Grid.Column="2"
                     Margin="5"
                     md:ThemeAssist.Theme="Light"
                     Background="White"
                     UniformCornerRadius="5">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="326" MinHeight="326" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <GroupBox Margin="0,0,0,10"
                              md:ElevationAssist.Elevation="Dp8"
                              BorderThickness="0"
                              Header="预警事件列表"
                              Style="{StaticResource MaterialDesignGroupBox}">
                        <txgycontrols:myListBox x:Name="AlarmEventListBox"
                                                Background="Transparent"
                                                BorderThickness="0"
                                                ItemsSource="{Binding AlarmEvents}"
                                                SelectedItem="{Binding SelectedAlarmEvent}">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Vertical" />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <ListBox.ItemContainerStyle>
                                <Style TargetType="ListBoxItem">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="ListBoxItem">
                                                <Border x:Name="outsideborder" Margin="5,0,5,0">
                                                    <StackPanel>
                                                        <StackPanel Height="56"
                                                                    Margin="5"
                                                                    VerticalAlignment="Top"
                                                                    Orientation="Horizontal">
                                                            <StackPanel MinWidth="150" VerticalAlignment="Center">
                                                                <StackPanel>
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="Time"
                                                                               Foreground="#939393"
                                                                               FontSize="8" />
                                                                    <TextBlock d:Text="2023-05-09T19:21:09"
                                                                               Text="{Binding EventTime}"
                                                                               FontWeight="Bold"
                                                                               FontFamily="SEGOE UI"
                                                                               FontSize="14"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>

                                                                <StackPanel Orientation="Horizontal">
                                                                    <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="ML"
                                                                                   Foreground="#939393"
                                                                                   FontSize="8" />
                                                                        <TextBlock Margin="5,0,0,0"
                                                                                   d:Text="-2.56"
                                                                                   Text="{Binding ML, StringFormat={}{0:F2}ml}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2"
                                                                                   FontSize="16" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="15,0,0,0" Orientation="Horizontal">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="能量"
                                                                                   Foreground="#939393"
                                                                                   FontSize="8" />
                                                                        <TextBlock Margin="5,0,0,0"
                                                                                   d:Text="10.87J"
                                                                                   Text="{Binding Energy, StringFormat={}{0:F0}J}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2"
                                                                                   FontSize="16" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                            </StackPanel>
                                                            <StackPanel Margin="20,0,0,0">
                                                                <StackPanel Orientation="Horizontal">
                                                                    <StackPanel>
                                                                        <TextBlock Text="东"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="38397887.88"
                                                                                   Text="{Binding X, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=E}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="10,0,0,0">
                                                                        <TextBlock Text="北"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="4030285.78"
                                                                                   Text="{Binding Y, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=N}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                                <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                    <StackPanel>
                                                                        <TextBlock Text="海拔"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="647.8"
                                                                                   Text="{Binding Z, StringFormat={}{0:F1}}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="30,0,0,0">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="性质"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="张性"
                                                                                   Text="{Binding SourceChara, Converter={StaticResource sourceCharaIntToStringConverter}}"
                                                                                   FontFamily="微软雅黑"
                                                                                   FontSize="12"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="40,0,0,0">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="主频"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="14Hz"
                                                                                   Text="{Binding DominantFreq, StringFormat={}{0}Hz}"
                                                                                   FontFamily="微软雅黑"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                            </StackPanel>
                                                        </StackPanel>
                                                        <Border Height="1"
                                                                BorderThickness="1"
                                                                BorderBrush="Gray" />
                                                    </StackPanel>
                                                </Border>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter TargetName="outsideborder" Property="Background" Value="#e9e9e9" />
                                                    </Trigger>
                                                    <Trigger Property="IsSelected" Value="True">
                                                        <Setter TargetName="outsideborder" Property="Background" Value="#cccccc" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListBox.ItemContainerStyle>
                        </txgycontrols:myListBox>
                    </GroupBox>

                    <GroupBox Grid.Row="1"
                              Margin="0,20,0,0"
                              md:ElevationAssist.Elevation="Dp8"
                              UseLayoutRounding="True"
                              BorderThickness="0"
                              Header="所有事件列表"
                              Style="{StaticResource MaterialDesignGroupBox}">
                        <txgycontrols:myListBox x:Name="ReceivedEventListBox"
                                                VerticalAlignment="Stretch"
                                                Background="Transparent"
                                                BorderThickness="0"
                                                SelectionMode="Single"
                                                ItemsSource="{Binding ReceviedEvents}"
                                                SelectedItem="{Binding SelectedReceviedEvent}"
                                                ScrollViewer.VerticalScrollBarVisibility="Visible" SelectionChanged="myListBox_SelectionChanged">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Vertical" />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <!--<ListBox.ItemTemplate>
                <DataTemplate>

                </DataTemplate>
            </ListBox.ItemTemplate>-->
                            <ListBox.ItemContainerStyle>
                                <Style TargetType="ListBoxItem">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="ListBoxItem">
                                                <Border x:Name="outsideborder" Margin="5,0,5,0">
                                                    <StackPanel>
                                                        <StackPanel Height="56"
                                                                    Margin="5"
                                                                    VerticalAlignment="Top"
                                                                    Orientation="Horizontal">
                                                            <StackPanel MinWidth="150" VerticalAlignment="Center">
                                                                <StackPanel>
                                                                    <TextBlock VerticalAlignment="Bottom"
                                                                               Text="Time"
                                                                               Foreground="#939393"
                                                                               FontSize="8" />
                                                                    <TextBlock d:Text="2023-05-09T19:21:09"
                                                                               Text="{Binding EventTime}"
                                                                               FontWeight="Bold"
                                                                               FontFamily="SEGOE UI"
                                                                               FontSize="14"
                                                                               Foreground="#FF7A40F2" />
                                                                </StackPanel>

                                                                <StackPanel Orientation="Horizontal">
                                                                    <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="ML"
                                                                                   Foreground="#939393"
                                                                                   FontSize="8" />
                                                                        <TextBlock Margin="5,0,0,0"
                                                                                   d:Text="-2.56"
                                                                                   Text="{Binding ML, StringFormat={}{0:F2}ml}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2"
                                                                                   FontSize="16" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="15,0,0,0" Orientation="Horizontal">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="能量"
                                                                                   Foreground="#939393"
                                                                                   FontSize="8" />
                                                                        <TextBlock Margin="5,0,0,0"
                                                                                   d:Text="10.87J"
                                                                                   Text="{Binding Energy, StringFormat={}{0:F0}J}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2"
                                                                                   FontSize="16" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                            </StackPanel>
                                                            <StackPanel Margin="20,0,0,0">
                                                                <StackPanel Orientation="Horizontal">
                                                                    <StackPanel>
                                                                        <TextBlock Text="东"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="38397887.88"
                                                                                   Text="{Binding X, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=E}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="10,0,0,0">
                                                                        <TextBlock Text="北"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="4030285.78"
                                                                                   Text="{Binding Y, StringFormat={}{0:F2}, Converter={StaticResource a2r}, ConverterParameter=N}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                                <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
                                                                    <StackPanel>
                                                                        <TextBlock Text="海拔"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="647.8"
                                                                                   Text="{Binding Z, StringFormat={}{0:F1}}"
                                                                                   FontFamily="SEGOE UI"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="30,0,0,0">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="性质"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="张性"
                                                                                   Text="{Binding SourceChara, Converter={StaticResource sourceCharaIntToStringConverter}}"
                                                                                   FontFamily="微软雅黑"
                                                                                   FontSize="12"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                    <StackPanel Margin="40,0,0,0">
                                                                        <TextBlock VerticalAlignment="Bottom"
                                                                                   Text="主频"
                                                                                   FontSize="8"
                                                                                   Foreground="#939393" />
                                                                        <TextBlock d:Text="14Hz"
                                                                                   Text="{Binding DominantFreq, StringFormat={}{0}Hz}"
                                                                                   FontFamily="微软雅黑"
                                                                                   Foreground="#FF7A40F2" />
                                                                    </StackPanel>
                                                                </StackPanel>
                                                            </StackPanel>
                                                        </StackPanel>
                                                        <Border Height="1"
                                                                BorderThickness="1"
                                                                BorderBrush="Gray" />
                                                    </StackPanel>
                                                </Border>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter TargetName="outsideborder" Property="Background" Value="#e9e9e9" />
                                                    </Trigger>
                                                    <Trigger Property="IsSelected" Value="True">
                                                        <Setter TargetName="outsideborder" Property="Background" Value="#cccccc" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListBox.ItemContainerStyle>
                        </txgycontrols:myListBox>
                    </GroupBox>
                </Grid>
            </md:Card>
            <!--#endregion-->
        </Grid>
        <Grid Background="Transparent" Visibility="{Binding Path=(comm:GlobalConfig.IsInitializing), Converter={StaticResource Bool2Visibility}}">
            <hc:CircleProgressBar Width="100"
                                  Height="100"
                                  Margin="0,0,0,0"
                                  FontSize="30"
                                  Value="{Binding Path=(comm:GlobalConfig.InitializingCounter)}" />
        </Grid>
    </Grid>

</UserControl>
