<!--
NavisworksTransport 检测动画页签视图 - 采用与类别设置和分层管理一致的Navisworks 2026风格

功能说明：
1. 动画参数设置：速度、帧率、持续时间、循环播放、平滑过渡等
2. 播放控制：开始、暂停、停止动画，显示播放进度和状态
3. 碰撞检测：运行碰撞检测、查看检测报告、显示检测结果摘要
4. 动画预览：提供操作指导和状态反馈

设计原则：与Navisworks 2026风格一致，480像素宽度，现代化UI布局
-->
<UserControl x:Class="NavisworksTransport.UI.WPF.Views.AnimationControlView"
             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:converters="clr-namespace:NavisworksTransport.UI.WPF.Converters"
             xmlns:views="clr-namespace:NavisworksTransport.UI.WPF.Views"
             mc:Ignorable="d" 
             d:DesignHeight="700" d:DesignWidth="480">
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/NavisworksTransportPlugin;component/src/UI/WPF/Resources/NavisworksStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            
            <!-- 转换器资源 -->
            <converters:BoolToVisibilityConverter x:Key="BoolToVisConverter"/>

            <!-- 动画控制页面特有的样式 -->
            <Style x:Key="ProgressBarStyle" TargetType="ProgressBar">
                <Setter Property="Height" Value="20"/>
                <Setter Property="Foreground" Value="{StaticResource NavisworksSecondaryBrush}"/>
                <Setter Property="Background" Value="{StaticResource NavisworksButtonBrush}"/>
                <Setter Property="BorderBrush" Value="{StaticResource NavisworksPrimaryBrush}"/>
                <Setter Property="BorderThickness" Value="1"/>
            </Style>

            <Style x:Key="SliderStyle" TargetType="Slider">
                <Setter Property="Foreground" Value="{StaticResource NavisworksSecondaryBrush}"/>
                <Setter Property="Height" Value="20"/>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <ScrollViewer VerticalScrollBarVisibility="Auto" Padding="10">
        <StackPanel>
            
            <!-- 区域1: 动画参数设置 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Label Content="动画参数设置" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <!-- 动画参数设置 -->
                    <Grid Margin="0,10,0,10">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        
                        <Label Grid.Column="0" Content="帧率:" Style="{StaticResource ParameterLabelStyle}"/>
                        <ComboBox Grid.Column="1" 
                                  ItemsSource="{Binding AvailableFrameRates}" 
                                  SelectedItem="{Binding SelectedFrameRate}" 
                                  Width="80"
                                  Margin="5,2,20,2"/>
                        <Label Grid.Column="2" Content="帧/秒" Style="{StaticResource UnitLabelStyle}" Margin="0,0,30,0"/>
                        
                        <Label Grid.Column="3" Content="持续时间:" Style="{StaticResource ParameterLabelStyle}"/>
                        <TextBox Grid.Column="4"
                                 Text="{Binding AnimationDuration, StringFormat=0.0###}"
                                 Style="{StaticResource ParameterInputStyle}"
                                 Width="80"
                                 Margin="5,2"/>
                        <Label Grid.Column="5" Content="秒" Style="{StaticResource UnitLabelStyle}"/>
                    </Grid>
                    
                </StackPanel>
            </Border>
            
            <!-- 区域2: 碰撞检测参数 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Label Content="碰撞检测参数" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <Grid Margin="0,10,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <!-- 检测间隙 -->
                        <StackPanel Grid.Row="0" Margin="0,5,0,5">
                            <Label Content="检测间隙(米)" Style="{StaticResource ParameterLabelStyle}"/>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Slider Grid.Column="0"
                                        Value="{Binding DetectionGap}"
                                        Minimum="0.0"
                                        Maximum="0.2"
                                        TickFrequency="0.01"
                                        Style="{StaticResource SliderStyle}"/>
                                <TextBlock Grid.Column="1"
                                           Text="{Binding DetectionGap, StringFormat={}{0:F2}}"
                                           VerticalAlignment="Center"
                                           Margin="5,0,0,0"
                                           Width="40"/>
                            </Grid>
                        </StackPanel>

                        <!-- 步长、速度和路径长度显示 -->
                        <Grid Grid.Row="1" Margin="0,10,0,5">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>

                            <!-- 步长 -->
                            <TextBlock Grid.Column="0" Margin="0,0,10,0"
                                       Text="{Binding CollisionDetectionAccuracy, StringFormat='步长： {0:F3} 米'}"
                                       VerticalAlignment="Center"/>

                            <!-- 速度 -->
                            <TextBlock Grid.Column="1" Margin="5,0,5,0"
                                       Text="{Binding MovementSpeed, StringFormat='速度： {0:F2} 米/秒'}"
                                       VerticalAlignment="Center"/>

                            <!-- 路径长度 -->
                            <TextBlock Grid.Column="2" Margin="10,0,0,0"
                                       Text="{Binding PathLength, StringFormat='路径长度： {0:F2} 米'}"
                                       VerticalAlignment="Center"/>
                        </Grid>
                        
                    </Grid>
                </StackPanel>
            </Border>
            
            <!-- 区域2.5: 指定碰撞检测对象 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Expander Header="指定碰撞检测对象" IsExpanded="False" Margin="0,0,0,5">
                        <StackPanel Margin="10,5,0,0">
                            <TextBlock Text="{Binding ManualCollisionTargetSummary}"
                                       Style="{StaticResource StatusTextStyle}"
                                       Margin="0,0,0,6"/>

                            <StackPanel Orientation="Vertical">
                                <CheckBox Content="启用手工指定模式"
                                          IsChecked="{Binding IsManualCollisionTargetEnabled}"
                                          FontWeight="SemiBold"/>
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <Button Content="选择对象"
                                        Command="{Binding ApplyManualTargetsFromSelectionCommand}"
                                        Style="{StaticResource SecondaryButtonStyle}"
                                        Margin="0,0,8,0"/>
                                <Button Content="清除"
                                        Command="{Binding ClearManualTargetsCommand}"
                                        Style="{StaticResource SecondaryButtonStyle}"
                                        IsEnabled="{Binding HasManualCollisionTargets}"
                                        Background="#FFFFE6E6"
                                        Foreground="#FF8B0000"
                                        Margin="0,0,8,0"/>
                                <Button Content="高亮显示"
                                        Command="{Binding HighlightManualTargetsCommand}"
                                        Style="{StaticResource SecondaryButtonStyle}"
                                        IsEnabled="{Binding HasManualCollisionTargets}"
                                        Margin="0,0,8,0"/>
                                <Button Content="清除高亮"
                                        Command="{Binding ClearManualHighlightsCommand}"
                                        Style="{StaticResource SecondaryButtonStyle}"
                                        IsEnabled="{Binding HasManualCollisionTargets}"/>
                            </StackPanel>

                            <StackPanel Margin="0,12,0,0"
                                        IsEnabled="{Binding IsManualCollisionTargetEnabled}">
                                <Label Content="已选对象列表"
                                       Style="{StaticResource SectionHeaderStyle}"/>

                                <TextBlock Text="当前未选择任何对象"
                                           Style="{StaticResource StatusTextStyle}"
                                           Foreground="#FF777777"
                                           Visibility="{Binding HasManualCollisionTargets, Converter={StaticResource BoolToVisConverter}, ConverterParameter=Inverse}"/>

                                <ListView ItemsSource="{Binding ManualCollisionTargets}"
                                          Margin="0,5,0,0"
                                          Visibility="{Binding HasManualCollisionTargets, Converter={StaticResource BoolToVisConverter}}"
                                          MinHeight="80"
                                          BorderBrush="#FFE2E8F0"
                                          BorderThickness="1">
                                    <ListView.View>
                                        <GridView>
                                            <GridViewColumn Header="检测对象" Width="320">
                                                <GridViewColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <StackPanel>
                                                            <TextBlock Text="{Binding DisplayName}" FontWeight="SemiBold"/>
                                                            <TextBlock Text="{Binding ModelPath}"
                                                                       Style="{StaticResource StatusTextStyle}"/>
                                                        </StackPanel>
                                                    </DataTemplate>
                                                </GridViewColumn.CellTemplate>
                                            </GridViewColumn>
                                            <GridViewColumn Header="操作" Width="80">
                                                <GridViewColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <Button Content="移除"
                                                                Command="{Binding DataContext.RemoveManualTargetCommand, RelativeSource={RelativeSource AncestorType=ListView}}"
                                                                CommandParameter="{Binding}"
                                                                Style="{StaticResource SecondaryButtonStyle}"/>
                                                    </DataTemplate>
                                                </GridViewColumn.CellTemplate>
                                            </GridViewColumn>
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                            </StackPanel>
                        </StackPanel>
                    </Expander>
                </StackPanel>
            </Border>

            <!-- 区域3: 生成动画 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Label Content="生成动画" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <!-- 移动物体来源选择 -->
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,10">
                        <RadioButton Content="选择模型物体" 
                                     IsChecked="{Binding UseSelectedObject}" 
                                     GroupName="ObjectSource"
                                     VerticalAlignment="Center"/>
                        <RadioButton Content="使用虚拟车辆" 
                                     IsChecked="{Binding UseVirtualVehicle}" 
                                     GroupName="ObjectSource"
                                     VerticalAlignment="Center"
                                     Margin="20,0,0,0"/>
                    </StackPanel>
                    
                    <!-- 方式1：选择模型物体 -->
                    <Grid Margin="0,5,0,10"
                          Visibility="{Binding UseSelectedObject, Converter={StaticResource BoolToVisConverter}}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        
                        <Label Grid.Column="0" Content="移动物体:" Style="{StaticResource ParameterLabelStyle}" Width="80"/>
                        <TextBlock Grid.Column="1" 
                                   Text="{Binding SelectedAnimatedObjectName, TargetNullValue='未选择移动物体'}" 
                                   VerticalAlignment="Center"
                                   Margin="5,0,10,0"
                                   FontWeight="SemiBold"
                                   Foreground="{Binding SelectedAnimatedObject, Converter={x:Null}, TargetNullValue='#FF999999'}"
                                   Background="#FFF5F5F5"
                                   Padding="5,3"/>
                        <StackPanel Grid.Column="2" Orientation="Horizontal">
                            <Button Content="选择物体" 
                                    Command="{Binding SelectAnimatedObjectCommand}" 
                                    Style="{StaticResource SecondaryButtonStyle}"
                                    Margin="0,0,5,0"/>
                            <Button Content="清除" 
                                    Command="{Binding ClearAnimatedObjectCommand}" 
                                    IsEnabled="{Binding HasSelectedAnimatedObject}"
                                    Style="{StaticResource SecondaryButtonStyle}"
                                    Background="#FFFFE6E6"
                                    Foreground="#FF8B0000"
                                    Margin="0"/>
                        </StackPanel>
                    </Grid>
                    
                    <!-- 方式2：虚拟车辆 -->
                    <Grid Margin="0,5,0,10"
                          Visibility="{Binding UseVirtualVehicle, Converter={StaticResource BoolToVisConverter}}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        
                        <Label Grid.Column="0" Content="虚拟车辆:" Style="{StaticResource ParameterLabelStyle}" Width="80"/>
                        <TextBlock Grid.Column="1" 
                                   VerticalAlignment="Center"
                                   Margin="5,0,10,0"
                                   FontWeight="SemiBold"
                                   Foreground="#FF2B579A"
                                   Background="#FFF5F5F5"
                                   Padding="5,3">
                            <Run Text="长 "/>
                            <Run Text="{Binding VirtualVehicleLength, StringFormat=F1, Mode=OneWay}"/>
                            <Run Text="m × 宽 "/>
                            <Run Text="{Binding VirtualVehicleWidth, StringFormat=F1, Mode=OneWay}"/>
                            <Run Text="m × 高 "/>
                            <Run Text="{Binding VirtualVehicleHeight, StringFormat=F1, Mode=OneWay}"/>
                            <Run Text="m"/>
                        </TextBlock>
                    </Grid>
                    
                    <!-- 虚拟车辆提示 -->
                    <TextBlock Text="提示：虚拟车辆尺寸来自路径编辑中的车辆参数设置" 
                               Style="{StaticResource StatusTextStyle}"
                               Foreground="#FF666666"
                               Margin="85,0,0,5"
                               Visibility="{Binding UseVirtualVehicle, Converter={StaticResource BoolToVisConverter}}"/>
                    
                    <!-- 选择路径 -->
                    <Grid Margin="0,5,0,10">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        
                        <Label Grid.Column="0" Content="移动路径:" Style="{StaticResource ParameterLabelStyle}" Width="80"/>
                        <TextBlock Grid.Column="1" 
                                   Text="{Binding CurrentPathRoute.Name, StringFormat='当前路径: {0}', TargetNullValue='当前路径: 未选择'}" 
                                   VerticalAlignment="Center"
                                   Margin="5,0,10,0"
                                   FontWeight="SemiBold"
                                   Foreground="{Binding CurrentPathRoute, Converter={x:Null}, TargetNullValue='#FF999999'}"
                                   Background="#FFF5F5F5"
                                   Padding="5,3"/>
                    </Grid>
                    
                    <!-- 路径信息 -->
                    <TextBlock Text="{Binding CurrentPathRoute.Points.Count, StringFormat='路径点数: {0}个', TargetNullValue='路径点数: 0个'}" 
                               Style="{StaticResource StatusTextStyle}"
                               Margin="85,0,0,10"/>
                    
                    <!-- 生成动画按钮 -->
                    <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
                        <Button Content="生成动画" 
                                Command="{Binding GenerateAnimationCommand}" 
                                IsEnabled="{Binding CanGenerateAnimation}" 
                                Style="{StaticResource SecondaryButtonStyle}"
                                Height="28"
                                Padding="12,4"/>
                    </StackPanel>
                    
                    <!-- 生成状态提示 -->
                    <TextBlock Text="提示：需要同时选择移动物体和移动路径才能生成动画" 
                               Style="{StaticResource StatusTextStyle}"
                               Foreground="#FF666666"
                               Margin="0,5,0,0"
                               Visibility="{Binding CanGenerateAnimation, Converter={StaticResource BoolToVisConverter}, ConverterParameter=Inverse}"/>
                </StackPanel>
            </Border>
            
            <!-- 区域4: 专业级媒体播放控制 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Label Content="播放控制" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <!-- 专业级媒体控制条 -->
                    <views:MediaControlBar DataContext="{Binding}" Margin="0,10,0,10"/>
                    
                </StackPanel>
            </Border>
            
            <!-- 区域5: 碰撞检测结果 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,15" Padding="12">
                <StackPanel>
                    <Label Content="碰撞检测结果" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <!-- 报告按钮 -->
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,15">
                        <Button Content="查看碰撞报告" 
                                Command="{Binding ViewCollisionReportCommand}" 
                                IsEnabled="{Binding HasCollisionResults}"
                                Style="{StaticResource ActionButtonStyle}"
                                Margin="0,0,8,0"/>
                        <Button Content="预计算高亮"
                                Command="{Binding HighlightCollisionResultsCommand}"
                                IsEnabled="{Binding HasCollisionResults}"
                                Style="{StaticResource SecondaryButtonStyle}"
                                Margin="0,0,8,0"/>
                        <Button Content="清除预计算高亮"
                                Command="{Binding ClearCollisionHighlightsCommand}"
                                IsEnabled="{Binding HasCollisionResults}"
                                Style="{StaticResource SecondaryButtonStyle}"
                                Margin="0,0,8,0"/>
                        <Button Content="结果高亮"
                                Command="{Binding HighlightClashDetectiveResultsCommand}"
                                IsEnabled="{Binding HasClashDetectiveResults}"
                                Style="{StaticResource SecondaryButtonStyle}"
                                Margin="0,0,8,0"/>
                        <Button Content="清除高亮"
                                Command="{Binding ClearClashDetectiveHighlightsCommand}"
                                IsEnabled="{Binding HasClashDetectiveResults}"
                                Style="{StaticResource SecondaryButtonStyle}"/>
                    </StackPanel>

                    <!-- ClashDetective结果列表 -->
                    <StackPanel Margin="0,15,0,0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            
                            <Label Grid.Column="0" Content="碰撞检测历史" Style="{StaticResource SectionHeaderStyle}"/>
                            <Button Grid.Column="1" 
                                    Content="刷新" 
                                    Command="{Binding RefreshClashDetectiveResultsCommand}"
                                    Style="{StaticResource SecondaryButtonStyle}"
                                    Height="22"
                                    Padding="8,2"
                                    Margin="0,0,0,0"/>
                        </Grid>

                        <TextBlock Text="当前路径暂无碰撞检测结果"
                                   Style="{StaticResource StatusTextStyle}"
                                   Foreground="#FF777777"
                                   Visibility="{Binding HasClashDetectiveResults, Converter={StaticResource BoolToVisConverter}, ConverterParameter=Inverse}"
                                   Margin="0,5,0,0"/>

                        <ListView ItemsSource="{Binding ClashDetectiveResults}"
                                  Margin="0,5,0,0"
                                  Visibility="{Binding HasClashDetectiveResults, Converter={StaticResource BoolToVisConverter}}"
                                  MinHeight="120"
                                  MaxHeight="200"
                                  BorderBrush="#FFE2E8F0"
                                  BorderThickness="1">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="测试名称" Width="140">
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Record.TestName}" 
                                                           FontWeight="SemiBold"
                                                           TextTrimming="CharacterEllipsis"
                                                           ToolTip="{Binding Record.TestName}"/>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                    <GridViewColumn Header="时间" Width="60">
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding TestTimeDisplay}" 
                                                           HorizontalAlignment="Center"/>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                    <GridViewColumn Header="碰撞数" Width="60">
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding CollisionCountDisplay}" 
                                                           HorizontalAlignment="Center"/>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                    <GridViewColumn Header="操作" Width="200">
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <Button Content="查看"
                                                            Command="{Binding ViewCommand}"
                                                            Style="{StaticResource SecondaryButtonStyle}"
                                                            Height="20"
                                                            Padding="6,0"
                                                            Margin="0,0,4,0"/>
                                                    <Button Content="报告"
                                                            Command="{Binding ReportCommand}"
                                                            Style="{StaticResource SecondaryButtonStyle}"
                                                            Height="20"
                                                            Padding="6,0"
                                                            Margin="0,0,4,0"/>
                                                    <Button Content="删除"
                                                            Command="{Binding DeleteCommand}"
                                                            Style="{StaticResource SecondaryButtonStyle}"
                                                            Height="20"
                                                            Padding="6,0"
                                                            Background="#FFFFE6E6"
                                                            Foreground="#FF8B0000"
                                                            Margin="0"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </StackPanel>
                </StackPanel>
            </Border>
            
            <!-- 区域6: 当前路径信息 -->
            <Border BorderBrush="#FFD4E7FF" BorderThickness="1" CornerRadius="0" Margin="0,0,0,0" Padding="12">
                <StackPanel>
                    <Label Content="当前路径信息" Style="{StaticResource SectionHeaderStyle}"/>
                    
                    <!-- 当前路径信息 -->
                    <Grid Margin="0,5,0,10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        
                        <TextBlock Grid.Row="0" 
                                   Text="{Binding CurrentPathRoute.Name, StringFormat='当前路径: {0}', TargetNullValue='当前路径: 未选择'}" 
                                   FontWeight="SemiBold" 
                                   Foreground="#FF2B579A"
                                   Margin="0,0,0,5"/>
                        
                        <TextBlock Grid.Row="1" 
                                   Text="{Binding CurrentPathRoute.Points.Count, StringFormat='路径点数: {0}个', TargetNullValue='路径点数: 0个'}" 
                                   Style="{StaticResource StatusTextStyle}"/>
                    </Grid>
                </StackPanel>
            </Border>
            
        </StackPanel>
    </ScrollViewer>
</UserControl>