<UserControl x:Class="StockChart.ucTitlebar"
             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:StockChart"
             xmlns:cvt="clr-namespace:StockChart.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="80" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <cvt:Value2BrushConverter x:Key="Value2BrushConverter" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Background="#222222">
        <Border Grid.Row="2" x:Name="bottomContainer" Padding="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Foreground="#FFA500" FontSize="16" FontWeight="Bold" VerticalAlignment="Center"  Text="{Binding SymbolName}"/>
                    <TextBlock Margin="15, 0, 0, 0" Foreground="#888888" FontSize="20" FontWeight="Bold"  VerticalAlignment="Center" Text="{Binding Price, StringFormat={}{0:.##}}" />
                    <TextBlock Margin="15, 0, 0, 0" Foreground="{Binding Chg, Converter={StaticResource Value2BrushConverter}}" FontSize="16" VerticalAlignment="Center" Text="{Binding Chg}" />
                </StackPanel>

                <local:ucAutoComplateComandTextBox x:Name="txtSymbol" Grid.Column="2" Width="220" Placeholder="Go to symbol" ItemsSource="{Binding SymbolNames}"  Command1="{Binding ChangeSymbolCommand}"  Text="{Binding ChangeSymbolCommandParamter, Mode=TwoWay}" >
                    <local:ucAutoComplateComandTextBox.ButtonContent>
                        <Path Data="M15.7,12.5l-3.2-3.2c0.4-0.8,0.6-1.8,0.6-2.8c0-3.6-2.9-6.6-6.6-6.6S0,2.9,0,6.6s2.9,6.6,6.6,6.6
	c1.2,0,2.3-0.3,3.2-0.8l3.1,3.1c0.4,0.4,1,0.4,1.4,0l1.4-1.4C16.1,13.6,16.1,12.9,15.7,12.5z M6.6,10.1c-2,0-3.5-1.6-3.5-3.5
	S4.6,3,6.6,3s3.5,1.6,3.5,3.5S8.5,10.1,6.6,10.1z" Fill="White" Width="16" Height="16" Stretch="Uniform" SnapsToDevicePixels="True" />
                    </local:ucAutoComplateComandTextBox.ButtonContent>
                </local:ucAutoComplateComandTextBox>
                
            </Grid>
        </Border>
    </Grid>
</UserControl>
