<flyctrllib:WindowBigClose x:Class="FLY.Thick.Base.UI.UiModule.FixGraphConfig"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
        xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
        xmlns:local="clr-namespace:FLY.Thick.Base.UI.UiModule"
        Title="Window_graphfix"  mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" SizeToContent="WidthAndHeight"
                           d:DataContext="{d:DesignInstance local:FixGraphItemParam}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <local:IntMsConverter x:Key="intmsconv"/>
            <local:TimeLenConverter x:Key="timelenconv"/>

        </ResourceDictionary>
    </Window.Resources>
    <Grid TextBlock.FontSize="24" TextBlock.FontStyle="Normal">
        <Grid x:Name="grid_null" d:DataContext="{d:DesignInstance local:FixGraphConfig}"/>
        <StackPanel Orientation="Vertical" Margin="5,20">
            <StackPanel Orientation="Horizontal">
                <StackPanel Orientation="Vertical" Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="混合数" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Mix}" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <StackPanel Orientation="Vertical" Margin="5">
                        <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="间隔" />
                        <StackPanel Orientation="Horizontal">
                            <ComboBox x:Name="combox_intervalopt" Width="140" HorizontalAlignment="Left" FontSize="32" 
                                      ItemsSource="{Binding DataContext.IntervalOpt, ElementName=grid_null}" 
                                      DisplayMemberPath="Title" SelectedValuePath="Interval" 
                                      SelectedValue="{Binding Interval}"/>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Vertical" Margin="5">
                        <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="数据量" />
                        <StackPanel Orientation="Horizontal">
                            <ComboBox x:Name="combox_datalenopt" Width="140" HorizontalAlignment="Left" FontSize="32" 
                                          ItemsSource="{Binding DataContext.DataLenOpt, ElementName=grid_null}" 
                                          SelectedValue="{Binding Len}"/>
                            <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm_interval}" Text="|" />
                            <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" >
                                        <Run>
                                            <MultiBinding Converter="{StaticResource timelenconv}" Mode="OneWay" >
                                                <Binding Path="Interval" />
                                                <Binding Path="Len" />
                                            </MultiBinding>
                                        </Run>
                            </TextBlock>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" >
                <StackPanel Orientation="Vertical" Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="AD模式" />
                    <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding IsADMode}" />
                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="自动Y轴" />
                    <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding IsAutoY}" />
                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="5" Visibility="{Binding IsAutoY,Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="自动Y轴中值" />
                    <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding IsAutoTarget}" />
                </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Visibility="{Binding IsAutoY,Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}">
                <StackPanel Orientation="Vertical" Margin="5" Visibility="{Binding IsAutoTarget,Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="Y轴中值" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding YTarget}" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="5">
                    <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="Y轴范围" />
                    <StackPanel Orientation="Horizontal">
                        <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding YRange}" />
                    </StackPanel>
                </StackPanel>
            </StackPanel>
            <Button Style="{StaticResource ButtonStyle_empty}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="button_save_Click" Margin="5,-100,5,0" Background="White">
                <Path Data="{StaticResource Geometry_check-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80"  />
            </Button>
        </StackPanel>
    </Grid>

</flyctrllib:WindowBigClose>
