<UserControl x:Class="HistoryWallEditTool.ControlsForData.DetailDataViewer"
             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:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:local="clr-namespace:HistoryWallEditTool.ControlsForData"
              Width="822" Height="703" Background="White">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="430"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!--左邊區塊-->
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="140" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <!--上方事件時間-->
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="40" />
                    <RowDefinition Height="40" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <TextBlock Text="{DynamicResource contenttitleText}" FontSize="18" VerticalAlignment="Center" Margin="40,0,0,0"></TextBlock>
                    <TextBlock Text="" FontSize="16" Foreground="Gray" VerticalAlignment="Center" Margin="160,0,0,0"></TextBlock>
                </Grid>
                <Grid Grid.Row="1">
                    <TextBlock Text="{DynamicResource contenttitlesuggest}" FontSize="16" Foreground="Gray" 
                                   VerticalAlignment="Center" TextWrapping="Wrap" Margin="40,0,0,0"></TextBlock>
                </Grid>
                <Border Grid.Row="2" BorderBrush="Black" BorderThickness="1" Width="350" Height="45" 
                        Margin="40,5,0,5" HorizontalAlignment="Left">
                    <TextBox x:Name="uxEventDate" FontSize="28" VerticalAlignment="Center" 
                             LostFocus="uxEventDate_LostFocus" ></TextBox>
                </Border>
            </Grid>
            <!--下方事件內容-->
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="60" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <TextBlock Text="{DynamicResource contentText}" FontSize="18" VerticalAlignment="Center" Margin="40,0,0,0"></TextBlock>
                    </Grid>
                    <Grid Grid.Row="1">
                        <TextBlock Text="{DynamicResource contentsuggest}" FontSize="16" Foreground="Gray" 
                                   VerticalAlignment="Center" TextWrapping="Wrap" Margin="40,0,0,0"></TextBlock>
                    </Grid>
                </Grid>
                <Grid Grid.Row="1">
                    <TextBlock x:Name="uxOverSign" Text="！" FontSize="20" Foreground="Red" Opacity="0"
                               Margin="20,0,0,0"></TextBlock>
                    <ScrollViewer VerticalScrollBarVisibility="Visible" Height="503">
                        <Border BorderBrush="Black" BorderThickness="1" Width="350" HorizontalAlignment="Left" 
                                Margin="40,0,0,0">
                            <TextBox x:Name="uxContent" FontSize="27" Width="340" Margin="5" 
                                     TextWrapping="Wrap"  LostFocus="uxContent_LostFocus"
                                     BorderThickness="0" AcceptsReturn="True"></TextBox>
                        </Border>
                    </ScrollViewer>
                </Grid>
            </Grid>
        </Grid>

        <!--右邊區塊-->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="95" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="50" />
                    <RowDefinition Height="45" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="40" />
                        <ColumnDefinition Width="130" />
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock x:Name="uxEventLineText" Grid.Column="1" TextWrapping="Wrap" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" Text="{DynamicResource eventimage}" ></TextBlock>
                    <mui:ModernButton x:Name="uxAddBtn" Grid.Column="2" EllipseDiameter="40" IconHeight="20" IconWidth="20" HorizontalAlignment="Left" ToolTip="{DynamicResource addbtntooltip}" Width="50" Click="uxAddBtn_Click"></mui:ModernButton>
                    <mui:ModernButton x:Name="uxDeleteBtn" Grid.Column="3" EllipseDiameter="40" IconHeight="20" IconWidth="20" HorizontalAlignment="Left" ToolTip="{DynamicResource deletebtntooltip}" Width="50" Click="uxDeleteBtn_Click"></mui:ModernButton>
                    <mui:ModernButton x:Name="uxUpBtn" Grid.Column="4" EllipseDiameter="40" IconHeight="20" IconWidth="20" HorizontalAlignment="Left" ToolTip="{DynamicResource moveupbtntooltip}" Width="50" Click="uxUpBtn_Click"></mui:ModernButton>
                    <mui:ModernButton x:Name="uxDownBtn" Grid.Column="5" EllipseDiameter="40" IconHeight="20" IconWidth="20" HorizontalAlignment="Left" ToolTip="{DynamicResource movedownbtntooltip}" Width="50" Click="uxDownBtn_Click"></mui:ModernButton>
                </Grid>
                <Grid Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="40" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock x:Name="uxWarningText" Grid.Column="1" HorizontalAlignment="Left" FontSize="16" 
                               VerticalAlignment="Center"  TextWrapping="Wrap"  Foreground="Gray"
                               Text="{DynamicResource imagesuggest}" >
                    </TextBlock>
                </Grid>
            </Grid>

            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="40" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <ListBox Grid.Column="1" x:Name="uxDetailImgListBox" Width="315" HorizontalAlignment="Stretch"
                         SelectionChanged="uxDetailImgListBox_SelectionChanged"
                         ItemContainerStyle="{StaticResource ListBoxItemBitmap}"
                         >

                </ListBox>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
