<Page
    x:Class="ModernKeePass.Views.SettingsNewDatabasePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="using:ModernKeePass.ViewModels" 
    mc:Ignorable="d">
    <Page.Resources>
        <CollectionViewSource x:Name="KeyDerivations" Source="{Binding FileFormats}" />
    </Page.Resources>
    <Page.DataContext>
        <viewModels:SettingsNewVm />
    </Page.DataContext>
    <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <TextBlock x:Uid="SettingsNewDatabaseDesc" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,0,0,10"/>
        <ToggleSwitch x:Uid="SettingsNewDatabaseSample" IsOn="{Binding IsCreateSample, Mode=TwoWay}" Style="{StaticResource MainColorToggleSwitch}" />
        <TextBlock x:Uid="SettingsNewDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ComboBox Grid.Column="1" ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding FileFormatVersion, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
            <Button Grid.Column="2" Style="{StaticResource TextBlockButtonStyle}">
                <SymbolIcon Symbol="Help" RenderTransformOrigin="0.5,0.5" >
                    <SymbolIcon.RenderTransform>
                        <CompositeTransform ScaleX="0.7" ScaleY="0.7"/>
                    </SymbolIcon.RenderTransform>
                </SymbolIcon>
                <Button.Flyout>
                    <Flyout>
                        <TextBlock x:Uid="SettingsNewDatabaseKdfMoreInfo" TextWrapping="WrapWholeWords" MaxWidth="400" />
                    </Flyout>
                </Button.Flyout>
            </Button>
        </Grid>
    </StackPanel>
</Page>
