<!--
    Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
    the MIT License. See LICENSE in the project root for license information.
-->
<Page x:Class="Microsoft.Terminal.Settings.Editor.Rendering"
      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:local="using:Microsoft.Terminal.Settings.Editor"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">

    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="CommonResources.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <DataTemplate x:Key="EnumComboBoxTemplate"
                          x:DataType="local:EnumEntry">
                <TextBlock Text="{x:Bind EnumName}" />
            </DataTemplate>
        </ResourceDictionary>
    </Page.Resources>

    <StackPanel Style="{StaticResource SettingsStackStyle}">
        <local:SettingContainer x:Uid="Globals_GraphicsAPI">
            <ComboBox AutomationProperties.AccessibilityView="Content"
                      ItemTemplate="{StaticResource EnumComboBoxTemplate}"
                      ItemsSource="{x:Bind ViewModel.GraphicsAPIList}"
                      SelectedItem="{x:Bind ViewModel.CurrentGraphicsAPI, Mode=TwoWay}"
                      Style="{StaticResource ComboBoxSettingStyle}" />
        </local:SettingContainer>

        <local:SettingContainer x:Uid="Globals_DisablePartialInvalidation">
            <ToggleSwitch IsOn="{x:Bind ViewModel.DisablePartialInvalidation, Mode=TwoWay}"
                          Style="{StaticResource ToggleSwitchInExpanderStyle}" />
        </local:SettingContainer>

        <local:SettingContainer x:Uid="Globals_SoftwareRendering">
            <ToggleSwitch IsOn="{x:Bind ViewModel.SoftwareRendering, Mode=TwoWay}"
                          Style="{StaticResource ToggleSwitchInExpanderStyle}" />
        </local:SettingContainer>
    </StackPanel>
</Page>
