<UserControl x:Class="Compdfkit_Tools.PDFControl.CPDFTitleBarControl"
             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" 
             mc:Ignorable="d" 
             d:DesignHeight="40" d:DesignWidth="1280">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../Asset/Styles/MenuItemStyle.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid x:Name="TitleBarGrid" Background="#FFFFFF" HorizontalAlignment="Stretch">
        <Grid Height="40" Width="auto" HorizontalAlignment="Left">
            <StackPanel Orientation="Horizontal">
                <Menu 
                  Width="auto" 
                  Background="Transparent"
                  VerticalAlignment="Top"
                  HorizontalAlignment="Left">
                    
                    <MenuItem Header="File" Style="{StaticResource Dropdown_MenuItem}">
                        <MenuItem Header="Open File(Ctrl+O)" Name="OpenFileItem" Style="{StaticResource Sub_MenuItem}" Click="OpenFileItem_Click"></MenuItem>
                        <MenuItem Header="Save File(Ctrl+S)" Style="{StaticResource Sub_MenuItem}"  Click="SaveFileItem_Click" IsEnabled="{Binding CanSave, RelativeSource={RelativeSource AncestorType=UserControl}}"></MenuItem>
                        <MenuItem Header="Save As(Ctrl+Shift+S)" Style="{StaticResource Sub_MenuItem}"  Click="SaveAsItem_Click"></MenuItem>
                    </MenuItem>
                    
                    <MenuItem Header="Help" Style="{StaticResource Dropdown_MenuItem}">
                        <MenuItem Header="About Us" Style="{StaticResource Sub_MenuItem}" Click="AboutUsItem_Click"></MenuItem>
                        <MenuItem Header="Contact Us" Style="{StaticResource Sub_MenuItem}" Click="ContactUs_Click"></MenuItem>
                        <MenuItem Header="Privacy Agreement" Style="{StaticResource Sub_MenuItem}" Click="PrivacyAgreement_Click"></MenuItem>
                        <MenuItem Header="Service Terms" Style="{StaticResource Sub_MenuItem}" Click="ServiceTerms_Click"></MenuItem>
                        <MenuItem Header="Developer Device ID" Style="{StaticResource Sub_MenuItem}" Click="DeviceSerial_Click"></MenuItem>
                    </MenuItem>
                </Menu>

                <Menu 
                  Width="auto" 
                  Background="Transparent"
                  VerticalAlignment="Top"
                  HorizontalAlignment="Left" Visibility="Collapsed">
                    <MenuItem Header="Settings" Style="{StaticResource Dropdown_MenuItem}">
                        <MenuItem Header="Theme" Width="100" Style="{StaticResource Sub_Dropdown_MenuItem}">
                            <MenuItem Header="Light" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
                            <MenuItem Header="Dark" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
                        </MenuItem>
                        <MenuItem Header="Mode" Style="{StaticResource Sub_Dropdown_MenuItem}">
                            <MenuItem Header="View" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
                        </MenuItem>
                        <MenuItem Header="Cutting" Style="{StaticResource Sub_MenuItem}"></MenuItem>
                    </MenuItem>
                </Menu>

                <Menu
                  Width="auto" 
                  Background="Transparent"
                  VerticalAlignment="Top"
                  HorizontalAlignment="Left" Visibility="Collapsed">
                    <MenuItem Header="Help" Style="{StaticResource Dropdown_MenuItem}">
                        <MenuItem Header="Guide" Style="{StaticResource Sub_MenuItem }"></MenuItem>
                        <MenuItem Header="Api Reference" Style="{StaticResource Sub_MenuItem }"></MenuItem>
                        <MenuItem Header="Contact us" Style="{StaticResource Sub_MenuItem }"></MenuItem>
                    </MenuItem>
                </Menu>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
