<flyctrllib:WindowBigClose  x:Class="FLY.Thick.FilmCasting.UI.UiModule.TrendGraphConfig"
        xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        mc:Ignorable="d" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
        Background="WhiteSmoke"
        SizeToContent="WidthAndHeight"      
        >
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Width="400">
        <Grid x:Name="grid_trend"/>
        <StackPanel Margin="5,20">
            <StackPanel Orientation="Horizontal" DataContext="{Binding DataContext,ElementName=grid_trend}">

                <Button Style="{StaticResource ButtonStyle_RectangleIcon}" Click="btnPreClick">
                    <Grid>
                        <iconPacks:PackIconMaterial Kind="ArrowLeft" />
                    </Grid>
                </Button>
                <Button Click="btnNextClick">
                    <Button.Style>
                        <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle_RectangleIcon}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsNewest}" Value="True">
                                    <Setter Property="Foreground" Value="Gray"/>
                                    <Setter Property="IsEnabled" Value="False"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
                    <Grid>
                        <iconPacks:PackIconMaterial Kind="ArrowRight" />
                    </Grid>
                </Button>
                <Button Click="btnNewestClick">
                    <Button.Style>
                        <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle_RectangleIcon}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsNewest}" Value="True">
                                    <Setter Property="Foreground" Value="Gray"/>
                                    <Setter Property="IsEnabled" Value="False"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
                    <Grid>
                        <iconPacks:PackIconMaterial Kind="ArrowCollapseRight" />
                        <!--当不是最新, 弹出 自动按[最新] 倒计时-->
                        <Grid Width="20" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,-5,-5" >
                            <Grid.Style>
                                <Style TargetType="Grid">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding IsNewest}" Value="True">
                                            <Setter Property="Visibility" Value="Hidden"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Grid.Style>
                            <Ellipse  Fill="#FFFF3535" />
                            <TextBlock Text="{Binding AutoKeepNewestTimeRemaining}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
                        </Grid>
                    </Grid>
                </Button>
                <TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="更新中" Visibility="{Binding IsLoading,Converter={StaticResource visbilityconv}}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" >

                <StackPanel Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="混合数" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Mix}" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="Y轴倍数" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding YRangePercent}" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="间隔" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Interval}"  />
                    </StackPanel>
                </StackPanel>
            </StackPanel>

            <Button Style="{StaticResource ButtonStyle_apply}" Click="btnOkClick"/>
        </StackPanel>
    </Grid>

</flyctrllib:WindowBigClose >