<UserControl x:Class="NavisworksTransport.UI.WPF.Controls.EventTimelineControl"
             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"
             mc:Ignorable="d" 
             d:DesignHeight="120" d:DesignWidth="800"
             Background="White">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <!-- 标题 -->
        <TextBlock Grid.Row="0" Text="事件时间线" FontWeight="Bold" Margin="5,2"/>
        
        <!-- 时间线画布 -->
        <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
            <Canvas x:Name="TimelineCanvas" Height="80" MinWidth="600">
                <!-- 基线 -->
                <Line x:Name="BaseLine" Stroke="#FFCCCCCC" StrokeThickness="2" 
                      X1="50" Y1="40" X2="550" Y2="40"/>
                
                <!-- 事件节点将由代码动态添加 -->
            </Canvas>
        </ScrollViewer>
        
        <!-- 图例 -->
        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5,2">
            <TextBlock Text="图例: " FontSize="10" Foreground="Gray"/>
            <Ellipse Width="8" Height="8" Fill="#4CAF50" Margin="5,0"/>
            <TextBlock Text="起点" FontSize="10" Margin="0,0,10,0"/>
            <Ellipse Width="8" Height="8" Fill="#2196F3" Margin="5,0"/>
            <TextBlock Text="途经" FontSize="10" Margin="0,0,10,0"/>
            <Ellipse Width="8" Height="8" Fill="#FF9800" Margin="5,0"/>
            <TextBlock Text="转弯" FontSize="10" Margin="0,0,10,0"/>
            <Ellipse Width="8" Height="8" Fill="#9C27B0" Margin="5,0"/>
            <TextBlock Text="等待" FontSize="10" Margin="0,0,10,0"/>
            <Ellipse Width="8" Height="8" Fill="#F44336" Margin="5,0"/>
            <TextBlock Text="装卸" FontSize="10" Margin="0,0,10,0"/>
            <Ellipse Width="8" Height="8" Fill="#607D8B" Margin="5,0"/>
            <TextBlock Text="终点" FontSize="10"/>
        </StackPanel>
    </Grid>
</UserControl>
