<UserControl x:Class="ModernFlyouts.Views.FlyoutView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ui="http://schemas.modernwpf.com/2019"
             xmlns:local="clr-namespace:ModernFlyouts"
             xmlns:localui="clr-namespace:ModernFlyouts.UI"
             xmlns:controls="clr-namespace:ModernFlyouts.Controls"
             xmlns:input="clr-namespace:ModernFlyouts.Input"
             xmlns:utils="clr-namespace:ModernFlyouts.Utilities"
             xmlns:media="clr-namespace:ModernFlyouts.UI.Fluent.Media"
             mc:Ignorable="d" media:RevealBrushHelper.TrackThisElement="True"
             Foreground="{DynamicResource SystemControlForegroundBaseHighBrush}">
    <!--<Border BorderThickness="2"
                CornerRadius="{DynamicResource FlyoutCornerRadius}"
                media:RevealBrushHelper.RevealBrushMode="None"
                Visibility="Collapsed">
        <Border.BorderBrush>
            <LinearGradientBrush>
                <GradientStop Color="Violet" Offset="0" />
                <GradientStop Color="Indigo" Offset="0.1667" />
                <GradientStop Color="Blue" Offset="0.3334" />
                <GradientStop Color="Green" Offset="0.501" />
                <GradientStop Color="Yellow" Offset="0.6668" />
                <GradientStop Color="Orange" Offset="0.8335" />
                <GradientStop Color="Red" Offset="1" />
            </LinearGradientBrush>
        </Border.BorderBrush>
    </Border>-->
    <Grid>
        <Border Background="#00FFFFFF" input:InputHelper.IsTapEnabled="True"
                input:InputHelper.TappedCommand="{x:Static utils:CommonCommands.CloseFlyoutCommand}"
                input:InputHelper.TappedCommandParameter="{x:Reference Name=TopBarHost}" />
        <controls:DirectableStackPanel
            Spacing="8" Margin="{x:Static localui:UIManager.FlyoutShadowMargin}"
            Direction="{Binding Source={x:Static local:FlyoutHandler.Instance}, Path=UIManager.OnScreenFlyoutContentStackingDirection}">
            <ui:ThemeShadowChrome Depth="{x:Static localui:UIManager.FlyoutShadowDepth}"
                CornerRadius="{DynamicResource FlyoutCornerRadius}"
                Width="{DynamicResource FlyoutWidth}"
                Visibility="{Binding PrimaryContentVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
                <Grid>
                    <Border Background="{DynamicResource FlyoutBackground}"
                            CornerRadius="{DynamicResource FlyoutCornerRadius}"/>
                    <StackPanel>
                        <ContentControl x:Name="TopBarHost" x:FieldModifier="private" />
                        <controls:CrossFadeContentControl Content="{Binding PrimaryContent}" />
                    </StackPanel>
                    <Border
                        BorderThickness="{DynamicResource FlyoutBorderThemeThickness}"
                        BorderBrush="{DynamicResource FlyoutBorderThemeBrush}"
                        CornerRadius="{DynamicResource FlyoutCornerRadius}" />
                </Grid>
                <!--<Border Background="{DynamicResource FlyoutBackground}"
                    BorderThickness="{DynamicResource FlyoutBorderThemeThickness}"
                    BorderBrush="{DynamicResource FlyoutBorderThemeBrush}"
                    CornerRadius="{DynamicResource FlyoutCornerRadius}">
                    
                </Border>-->
            </ui:ThemeShadowChrome>
            <ui:ThemeShadowChrome Depth="{x:Static localui:UIManager.FlyoutShadowDepth}"
                CornerRadius="{DynamicResource FlyoutCornerRadius}"
                Width="{DynamicResource FlyoutWidth}"
                Visibility="{Binding SecondaryContentVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
                <Grid>
                    <Border Background="{DynamicResource FlyoutBackground}"
                            CornerRadius="{DynamicResource FlyoutCornerRadius}"/>
                    <controls:CrossFadeContentControl Content="{Binding SecondaryContent}" />
                    <Border
                        BorderThickness="{DynamicResource FlyoutBorderThemeThickness}"
                        BorderBrush="{DynamicResource FlyoutBorderThemeBrush}"
                        CornerRadius="{DynamicResource FlyoutCornerRadius}" />
                </Grid>
            </ui:ThemeShadowChrome>
        </controls:DirectableStackPanel>
    </Grid>
</UserControl>
