<controls:SettingsCard
    x:Class="Pixeval.Controls.Settings.FontSettingsCard"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:CommunityToolkit.WinUI.Controls"
    xmlns:controls1="using:Pixeval.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:fluent="using:FluentIcons.WinUI"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:models="using:Pixeval.Settings.Models"
    Header="{x:Bind Entry.Header}"
    Tag="{x:Bind Entry.Attribute}"
    mc:Ignorable="d">
    <controls:SettingsCard.HeaderIcon>
        <fluent:SymbolIcon Symbol="{x:Bind Entry.HeaderIcon}" />
    </controls:SettingsCard.HeaderIcon>
    <controls:SettingsCard.Description>
        <HyperlinkButton
            Click="OpenLinkViaTag_OnClicked"
            Content="{x:Bind Entry.Description}"
            Tag="ms-settings:fonts" />
    </controls:SettingsCard.Description>
    <ComboBox
        x:Uid="/SettingsPage/AppFontFamilyComboBox"
        Width="200"
        ItemsSource="{x:Bind models:FontAppSettingsEntry.AvailableFonts}"
        SelectedItem="{x:Bind Entry.Value, Mode=TwoWay}">
        <ComboBox.ItemTemplate>
            <DataTemplate x:DataType="x:String">
                <TextBlock FontFamily="{x:Bind controls1:C.ToFontFamily((x:String))}" Text="{x:Bind}" />
            </DataTemplate>
        </ComboBox.ItemTemplate>
    </ComboBox>
</controls:SettingsCard>
