<UserControl
    x:Class="APKInstaller.Controls.CapabilitiesInfoControl"
    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"
    mc:Ignorable="d">
    <Grid
        x:Name="Root"
        Margin="-10"
        Padding="10"
        BorderBrush="{StaticResource SystemAccentColor}">
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition />
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition x:Name="CapabilitiesHeight" Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock
            x:Name="HeaderTextBlock"
            Grid.Row="0"
            Text="{x:Bind HeadText, Mode=OneWay}"
            TextWrapping="WrapWholeWords"
            ToolTipService.ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}" />
        <ScrollViewer
            x:Name="CapabilitiesScrollViewer"
            Grid.Row="1"
            VerticalScrollBarVisibility="Auto">
            <Grid>
                <RichTextBlock
                    x:Name="RichTextBlockCapabilities"
                    IsTextSelectionEnabled="True"
                    Opacity="0.6"
                    TextWrapping="Wrap" />
                <RichTextBlock
                    x:Name="RichTextBlockFullCapabilities"
                    IsTextSelectionEnabled="True"
                    LostFocus="Root_LostFocus"
                    Opacity="0.6"
                    TextWrapping="Wrap"
                    Visibility="Collapsed" />
            </Grid>
        </ScrollViewer>
        <HyperlinkButton
            x:Name="MoreButton"
            x:Uid="/CapabilitiesInfoControl/MoreButton"
            Grid.Row="2"
            Padding="0"
            AutomationProperties.Name="Show more capabilitiesMore"
            Background="Transparent"
            BorderThickness="0"
            Click="MoreButton_Click"
            TabIndex="4"
            UseSystemFocusVisuals="True" />
    </Grid>
</UserControl>
