<styles:WindowChromeBase x:Class="_1RM.View.LauncherWindowView"
                         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"
                         xmlns:styles="clr-namespace:Shawn.Utils.WpfResources.Theme.Styles;assembly=Shawn.Utils.WpfResources"
                         xmlns:s="https://github.com/canton7/Stylet"
                         xmlns:view="clr-namespace:_1RM.View"
                         xmlns:noteDisplay="clr-namespace:_1RM.Controls.NoteDisplay"
                         WindowStartupLocation="CenterScreen"
                         ResizeMode="NoResize"
                         WindowStyle="None"
                         SizeToContent="WidthAndHeight"
                         ShowInTaskbar="False"
                         Background="Transparent"
                         mc:Ignorable="d"
                         MinWidth="100"
                         MinHeight="100"
                         d:DataContext="{d:DesignInstance view:LauncherWindowViewModel}"
                         Title="Launcher">
    <WindowChrome.WindowChrome>
        <WindowChrome GlassFrameThickness="-1" />
    </WindowChrome.WindowChrome>
    <Window.Resources>
        <Style TargetType="FlowDocument">
            <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>


        <Border Name="BorderMainContent" Padding="10 40">
            <StackPanel MinHeight="{x:Static view:LauncherWindowViewModel.LAUNCHER_GRID_KEYWORD_HEIGHT}">
                <Border CornerRadius="{x:Static view:LauncherWindowViewModel.LauncherOutlineCornerRadiusObj}" Background="{DynamicResource PrimaryMidBrush}">
                    <Border.Effect>
                        <DropShadowEffect BlurRadius="10" />
                    </Border.Effect>

                    <Grid Clip="{Binding GridMainClip}" 
                          Width="{x:Static view:LauncherWindowViewModel.LAUNCHER_LIST_AREA_WIDTH}" 
                          Height="{Binding GridMainHeight}">
                        <ContentControl Name="ServerSelectionsView" 
                                        IsTabStop="False"
                                        Visibility="{Binding ServerSelectionsViewVisibility}"
                                        s:View.Model="{Binding ServerSelectionsViewModel}"
                                        PreviewMouseMove="WinTitleBar_OnPreviewMouseMove"></ContentControl>

                        <ContentControl s:View.Model="{Binding QuickConnectionViewModel}"
                                        IsTabStop="False"
                                        PreviewMouseMove="WinTitleBar_OnPreviewMouseMove"
                                        Visibility="{Binding ElementName=ServerSelectionsView, Path=Visibility, Converter={StaticResource ConverterEqual2Collapsed}, ConverterParameter={x:Static Visibility.Visible}}">
                        </ContentControl>
                    </Grid>
                </Border>
            </StackPanel>
        </Border>

        <!--Note 显示备注-->
        <Border Name="NoteField" Grid.Column="1" Padding="10 40" 
                Visibility="{Binding  ServerSelectionsViewModel.GridNoteVisibility}">
            <Border.Style>
                <Style TargetType="Border">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ElementName=ServerSelectionsView, Path=Visibility}" Value="Collapsed">
                            <Setter Property="Visibility" Value="Collapsed"></Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>
            <noteDisplay:NoteDisplayAndEditor Width="{Binding NoteWidth}" 
                                              Height="{Binding GridNoteHeight}" 
                                              Server="{Binding ServerSelectionsViewModel.SelectedItem.Server, Mode=OneWay}"
                                              EditEnable="True"
                                              CloseButtonVisibility="Visible"
                                              CommandOnCloseRequest="{Binding ServerSelectionsViewModel.CmdHideNoteField, Mode=OneWay}"
            ></noteDisplay:NoteDisplayAndEditor>
        </Border>
    </Grid>
</styles:WindowChromeBase>