<UserControl x:Class="FasdDesktopUi.Basics.UserControls.MenuBar"
             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:local="clr-namespace:FasdDesktopUi.Basics.UserControls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
             mc:Ignorable="d"
             d:DesignHeight="350"
             d:DesignWidth="800"
             Height="Auto"
             MinWidth="310"
             Name="MenuBarUc"
             Initialized="UserControl_Initialized">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibility" />
        <vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
    </UserControl.Resources>

    <StackPanel>
        <StackPanel x:Name="MenuBarStackPanel" x:FieldModifier="private"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right">

            <ico:AdaptableIcon x:Name="SearchButton" x:FieldModifier="private"
                               Style="{DynamicResource Menu.MenuBar.PinnedIcon}"
                               MouseUp="SearchButton_MouseUp"
                               TouchDown="SearchButton_TouchDown"
                               SelectedInternIcon="menuBar_search" />

            <Grid>

                <Border x:Name="NotepadNotificationBorder" x:FieldModifier="private"
                        Background="Transparent" 
                        Panel.ZIndex="1" 
                        IsHitTestVisible="False"
                        BorderBrush="{DynamicResource Background.Menu.Icon.Hover}"
                        CornerRadius="5"
                        BorderThickness="1"
                        Margin="2, -3, 2, -3"
                        Visibility="Collapsed">

                    <Ellipse Fill="{DynamicResource Color.Red}" 
                             Width="15" 
                             Height="15" 
                             HorizontalAlignment="Right" 
                             VerticalAlignment="Top"
                             Margin="0,-4, -4,0"
                             IsHitTestVisible="False"/>

                </Border>

                <ico:AdaptableIcon  x:Name="NotepadButton" x:FieldModifier="private"
                                    Style="{DynamicResource Menu.MenuBar.PinnedIcon}"
                                    MouseUp="NotepadButton_MouseUp"
                                    TouchDown="NotepadButton_TouchDown"
                                    SelectedMaterialIcon="ic_edit" 
                                    IsHitTestVisible="True"/>
            </Grid>

            <ico:AdaptableIcon x:Name="MoreButton" x:FieldModifier="private"
                               Style="{DynamicResource Menu.MenuBar.PinnedIcon.More}"
                               ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Quickaction.More}"
                               MouseUp="MoreButton_MouseUp"
                               TouchDown="MoreButton_TouchDown" />
        </StackPanel>
    </StackPanel>

</UserControl>
