<UserControl x:Class="MegaRobo.C00225155App.MenuViews.LiquidBottleUserControl_Show"
             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:MegaRobo.C00225155App.MenuViews"
             xmlns:convert="clr-namespace:MegaRobo.C00225155App.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="44" d:DesignWidth="45"  Height="44"  Width="45" >
    <UserControl.Resources>
        <convert:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    </UserControl.Resources>
    <Grid>
        <StackPanel Margin="0" Background="Transparent" >
            <!-- 绘制瓶子形状 -->
            <Border Margin="0" x:Name="BottlePath" 
                    Background="{Binding LiquidBottleModel.LiquidDisplayColor,RelativeSource={RelativeSource AncestorType=UserControl}}"  
                    BorderBrush="#FFA0A0A0"  
                    BorderThickness="1" CornerRadius="17" Height="34" Width="34" >
                <TextBlock Text="{Binding LiquidBottleModel.SourceLiquidName,RelativeSource={RelativeSource AncestorType=UserControl}}" 
                           FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/>

            </Border>
            <Border   BorderThickness="1" CornerRadius="2"  Width="45" Height="10" Visibility="{Binding LiquidBottleModel.HaveBottle,RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource BooleanToVisibilityConverter}}">
                <TextBlock Text="{Binding LiquidBottleModel.RemainVolume,StringFormat=f2,RelativeSource={RelativeSource AncestorType=UserControl}}" 
                       FontSize="10"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>

        </StackPanel>

    </Grid>
</UserControl>
